Code Block |
---|
|
//--- Get PreserveDataOnMergedCells
bool preserveData = importProps.PreserveDataOnMergedCells;
//--- Set PreserveDataOnMergedCells
importProps.PreserveDataOnMergedCells = false;
| {code}
{code:|title=} |
'--- Get PreserveDataOnMergedCells
Dim preserveData As Boolean = importProps.PreserveDataOnMergedCells
'--- Set PreserveDataOnMergedCells
importProps.PreserveDataOnMergedCells = False
| {code}
{ Web only |
---|
| To see what this looks like, go to our online documentation: |
---|
| To |
---|
| }
Given the following data set:
||||||
||||||
||||||
Is being imported into the following cells:
!EmptyCells.png|border=0!
If {{PreserveDataOnMergedCells}} is equal to {{true}}, each value will be assigned to a cell or group of merged cells.
The result for the above example would be:
!PreserveDataTrue.png|border=0!
If {{PreserveDataOnMergedCells}} is equal to {{false}}, {{ImportData}} will treat all cells as though they are unmerged. Any additional values that are imported into merged areas will be lost.
The result for the above example would be:
!PreserveDataFalse.png|border=0!
{web-only}
{example}
{remarks}When {{PreserveDataOnMergedCells}} is set to {{true}} it will also affect column names when {{UseColumnNames}} is also set to true.
{remarks}Image Added If PreserveDataOnMergedCells is equal to true , each value will be assigned to a cell or group of merged cells. The result for the above example would be: Image Added If PreserveDataOnMergedCells is equal to false , ImportData will treat all cells as though they are unmerged. Any additional values that are imported into merged areas will be lost. The result for the above example would be: Image Added |