Spread Windows Forms 8.0 Product Documentation
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.

Specific Cell Properties

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
BackColor 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.
Border 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.
CellType See the Cell-Type Settings Exported.

Column

ColumnSpan

See the Row and Column Settings Exported.

Font Excel applies font settings to the cell, the row, the column, and the spreadsheet, using the same precedence Spread uses.
ForeColor The cell font color (or text color) is translated to one of the 56 Excel-supported colors.
Formula 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.

HorizontalAlignment

VerticalAlignment

Excel uses the Spread setting.

Locked

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.

Note Cell notes in Spread are exported to Excel.

Parent

ParentStyleName

Hierarchies are not exported to Excel.

ReferenceStyle Excel uses the Spread setting.

Row

RowSpan

(See the Row and Column Settings Exported.)

StyleName Excel does not support styles.
Tag Excel does not support tags.
Text For the contents of the cell, see Value. Spread displays formatted data as Text but there is no equivalent in Excel.
Value Spread exports the contents of the cell. The data is taken from the data models.

AllowAutoSort

ShowSortIndicator

SortIndicator

Excel does not support these settings. Excel does not handle sorting the same way Spread does.

DataField Excel does not support this setting. Excel does not have data binding as Spread does.
Label Excel does not support labels.
PageBreak RowPageBreak and ColumnPageBreak settings are exported.
Resizable Excel does not support turning off sizing.

Cell Quantity

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.

Cell Spans

Since Excel supports cell spans, any cell spans in Spread are exported.

Cell Sparklines

Since Excel supports sparklines, sparklines in Spread are exported.

Conditional Formatting with Rules

Only conditional formatting that uses rules is exported. Custom icon sets with the icon rule are not exported.

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options | Documentation Feedback