TImportOptions Class
Options that affect how the file will be imported into the grid.
Syntax
Unit: FMX.TMSGridExcelImport
TImportOptions = class(TPersistent);
Constructors
Name | Description |
---|---|
Create | Creates a new instance. |
Methods
Name | Description |
---|---|
Assign | Assigns an exisiting object to this one. |
Properties
Name | Description |
---|---|
Formulas | If true, formulas in Excel will be imported as formulas in the grid. Curently those formula won't calculate. If false, the values of the formulas will be imported. |
Images | If true, images will be imported into the grid. Note that as Excel supports "floating" images over a range of cells and the TMS Grid needs the full image to be on one cell, TMSGridExcelImport will merge the cells below the image when importing. |
Comments | If true, comments in Excel will be imported as comments in the grid. |
CellFormatting | If true, cel formatting like background color will be imported into the grid. |
CellSizes | If true, row heights and columns widths will be imported into the grid. If false they won't. |
LockedCellsAsReadonly | If true, locked cells in Excel will be imported as readonly cells in the grid. Note that by default all cells in Excel are locked but they won't be readonly unless the sheet is protected. So to use this property you need protected Excel sheets where cells have been unlocked, or all the file will be imported as readonly. |
Html | If true, rich text in Excel will be imported as html text in the grid. If false (the default) rich text will be imported as simple strings. |
PrintOptions | If true, many print options in the Excel file (like print orientation) will be imported into the grid. |
Outlines | If true (the default) outlines in Excel will be imported as nodes in the grid. |
ClearCells | If true, the cells in the grid will be cleared before importing. If false, the cells in Excel will just overwrite exiting ones, but empty cells in Excel will keep the old values in the grid. |
ResizeGrid | If true, the grid will be resized to fit exactly the used range in the sheet being imported. If false only cells that fit into the existing grid will be imported. |
ActiveSheet | This option only works when importing into a workbook. If true, it will set the active sheet in the workbook to be the same sheet that was active in the imported xls file. |