public WorksheetTable FormatAsTable( bool tableHasHeaders )
Exception | Description |
---|---|
System.InvalidOperationException | The region contains one or more cells from another WorksheetTable. |
System.InvalidOperationException | The region contains one or more cells which have a multi-cell ArrayFormula applied. |
System.InvalidOperationException | The region contains one or more cells which are part of a WorksheetDataTable. |
When the table is created, the Workbook.DefaultTableStyle will be applied to the value.
When the table is created, the column names will be taken from the cells in the header row if tableHasHeaders is True. If it is False, the column names will be generated and the cells for the header row will be inserted into the worksheet.
The column names are unique within the owning WorksheetTable. If, when the table is created, there are two or more columns with the same name, the second and subsequent duplicate column names will have a number appended to make them unique. If any cells in the header row have a non-string value, their value will be changed to a string (the current display text of the cell). If any cells in the header row have no value, they will be given a generated column name.
If the region partially contains any merged cell regions, they will be removed from the worksheet and the table region will be expanded to include all cells from the merged region.
Target Platforms: Android 4.4+, iOS 8+
Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+