Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Wiki Markup
{introducedin: 8.5.1

...

Description

Excerpt

Sets or returns whether values should be preserved when importing into merged cells. The default value is true.

{signature}
{example}{code:csharp|title=C#}

          //--- Get PreserveDataOnMergedCells
          bool preserveData = importProps.PreserveDataOnMergedCells;

          //--- Set PreserveDataOnMergedCells
          importProps.PreserveDataOnMergedCells = false;
        
{code}
{code:vb.net
|title=vb.net
}

          '--- 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 see what this looks like, go to our online documentation:
}

Given the following data set:

|1
|2
|3
|4
|5
|
|6
|7
|8
|9
|10
|
|11
|12
|13
|14
|15
|

Is being imported into the following cells:

Image Removed

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 Removed

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 Removed

Signature
C#C#
}

{description}
{excerpt}Sets or returns whether values should be preserved when importing into merged cells. The default value is {{true}}.
{excerpt}

{signature:C#}
 public boolean PreserveDataOnMergedCells{ get; set; }
Signature
{signature}{signature:vb.net
vb.net
}
Public Property PreserveDataOnMergedCells() As Boolean
Example
Code Block
csharpcsharp
titleC#
Code Block
vb.nettitle
Remarks
When PreserveDataOnMergedCells is set to true it will also affect column names when UseColumnNames is also set to true.


!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}