Spread Windows Forms 8.0 Product Documentation > Import and Export Reference > Excel-Formatted Files Export > Cell Settings Exported |
Spread supports customization at the cell level, apart from settings at the row or column level (discussed in Row and Column Settings Exported) and the overall sheet level (discussed in Component and Sheet Settings Exported). The settings summarized in this topic are at the cell (Cell object) level. Additional information includes customizations of the cell types; this is discussed in Cell-Type Settings Exported.
When exporting to Excel 2007 (Office Open XML), no loss of color information occurs. Spread is more constrained when exporting to Excel (BIFF8). When exporting to Excel (BIFF8), some changes to colors may occur.
Spread supports the creation of custom color palettes (BIFF record PALETTE) when exporting documents to Excel 2003 (.XLS) using the following method:fpSpread.SaveExcel(“outfile.xls”) Excel 2003 supports a 56-color palette, so this produces a custom palette for Spread if 56 or fewer colors are set within the Spread component. If the Spread component has greater than 56 colors set, by default the component uses the default Excel 2003 (.XLS) color palette and uses a color approximation algorithm to determine the best default color to use for each color set in the Spread component. As an option for the condition where greater than 56 colors are set in the Spread component, there is an ExcelSaveFlag enumeration added to allow you to choose to use the custom palette as the basis for the approximation algorithm. The use of the enumeration is as follows: fpSpread.SaveExcel(“outfile.xls”, FarPoint.Excel.ExcelSaveFlags.UseCustomPaletteForColorApproximations)If you use the UseCustomPaletteForColorApproximations enumeration, the custom palette is created and saved to the exported Excel 2003 (.XLS) document and all color references in the document refer to the custom palette.
This table summarizes how the cell settings are handled when Spread exports to an Excel‑formatted file. These properties are in the Cell class unless otherwise noted.
Spread Property | Excel Setting and Remarks |
---|---|
The cell background color is set using the same precedence that Spread uses (cell, row, column, spreadsheet). The color from Spread is translated to be one of 56 Excel colors. |
|
LineBorder and ComplexBorder classes set on cells in Spread are exported to Excel.Spread can have an unlimited border width; when exporting to Excel, Spread exports the largest border width that Excel allows. |
|
See the Cell-Type Settings Exported. |
|
See the Row and Column Settings Exported. |
|
Excel applies font settings to the cell, the row, the column, and the spreadsheet, using the same precedence Spread uses. |
|
The cell font color (or text color) is translated to one of the 56 Excel-supported colors. |
|
Excel uses the formulas from Spread. Custom functions are not exported. Date-related functions might not evaluate to the same value in Excel due to Excel’s minimum allowed date being January 1, 1990 (or January 1, 1904) and Spread’s minimum allowed date is January 1, 1 A.D. Refer to the Formula Reference for a list of Spread built-in functions. |
|
Excel uses the Spread setting. |
|
Excel uses the Spread setting. Spreadsheets exported from Spread export the Lock property setting for each cell. The default value of the Lock property is False for all cells in Spread. For information on the Protect setting (at the sheet level but really a row or column setting) refer to Row and Column Settings Exported. |
|
Cell notes in Spread are exported to Excel. |
|
Hierarchies are not exported to Excel. |
|
Excel uses the Spread setting. |
|
(See the Row and Column Settings Exported.) |
|
Excel does not support styles. |
|
Excel does not support tags. |
|
For the contents of the cell, see Value. Spread displays formatted data as Text but there is no equivalent in Excel. |
|
Spread exports the contents of the cell. The data is taken from the data models. |
|
Excel does not support these settings. Excel does not handle sorting the same way Spread does. |
|
Excel does not support this setting. Excel does not have data binding as Spread does. |
|
Excel does not support labels. |
|
RowPageBreak and ColumnPageBreak settings are exported. |
|
Excel does not support turning off sizing. |
Since Spread supports up to two billion rows and two billion columns on any sheet, and Excel supports less than this, only the number of rows and columns that Excel can handle is exported.
Since Excel supports cell spans, any cell spans in Spread are exported.
Since Excel supports sparklines, sparklines in Spread are exported.
Only conditional formatting that uses rules is exported. Custom icon sets with the icon rule are not exported.