Spread Windows Forms 7.0 Product Documentation
Cell-Type Settings Exported
Support Options
Spread Windows Forms 7.0 Product Documentation > Import and Export Reference > Excel-Formatted Files Export > Cell-Type Settings Exported

Glossary Item Box

Spread provides built-in cell types to allow cell formatting whereas Excel provides cell formats. Excel supports cell-level data formatting by allowing format strings to be applied to cells. There is not a simple one-to-one correspondence between Spread cell types and Excel cell formats. When Spread exports cells to an Excel‑formatted file, Spread builds an Excel-like format string based on the cell type properties. That format string is then compared to Excel’s internal number formats. If there is a match, the format is exported as an index into Excel’s internal number format table. If, however, there is not a match, the format string is exported as a custom format.

For cell types that you create, any formatting is lost upon exporting. Since Spread cannot know what cell format corresponds to a custom cell type, only the value is exported.

For more information on cell types, refer to Customizing Interaction with Cell Types in the Developer's Guide.

Specific Cell Types Supported

The table below summarizes the formats that are exported when Spread exports to an Excel‑formatted file and the restrictions that apply. There is a considerable amount of functionality in Spread that does not have an equivalent in Excel and so is lost on export. The cell types are each in a separate class in the FarPoint.Win.Spread.CellType namespace.

Spread Cell Type  Excel Format  Remarks and Restrictions 

BarCodeCellType

General or Custom format

Spread does not export barcode images to Excel objects.

ButtonCellType

General or Custom format

The cell contains the value from the button. Spread does not export to Excel objects.

CheckBoxCellType

General or Custom format

The cell contains True or False. The check box control has no equivalent in Excel.

ColorPickerCellType

General or Custom format

Spread does not export this color or color picker images to Excel objects.

ComboBoxCellType

General or Custom format

The cell contains the value of the selected or default item from the combo box or index of that item and the list. Spread does not export to Excel objects.

CurrencyCellType

Currency format

The cell contains the numeric value with the currency format.

DateTimeCellType

Date or Time or Custom format

The cell contains the date and time value and format.

EmptyCellType

General format

The cell is empty.

GcDateTimeCellType

General or custom format

If the ExcelExportFormat property is null, the format is General. If the ExcelExportFormat property is not null, the format is custom.

GcTextBoxCellType

General or custom format

The cell contains the text.

GeneralCellType

General format

The Spread GeneralCellType parses and formats similarly to Excel, with the difference being that the Spread GeneralCellType parses the input data to determine the best-fit data type and format string for the data. When saved to Excel, the parsed format string is saved as well. For example, if you have a number in a GeneralCellType, it is exported with a custom format.

HyperLinkCellType

General or Custom format

The cell contains the string of text without a hyperlink.

ImageCellType

General or default

Images are exported as shapes (BIFF8 only).

MaskCellType

General or Custom format

The cell contains the string value.

MultiOptionCellType

General or Custom format

The cell contains the value of the selected or default item from the multiple options button. (See further explanation below.) Spread does not export to Excel objects.

NumberCellType

Integer or Custom format

The cell contains the numeric value with formatting.

PercentCellType

Percentage or Custom format

The cell contains the actual value (not the percent value) with formatting. For example, if the minimum was 0 and maximum was 200, and the value was 50, the value of 50 would be exported, not 25%.

ProgressCellType

Percentage or Custom format

The cell contains the percent value. Spread does not export to Excel objects.

RegularExpressionCellType

General or default

The cell contains the value.

RichTextCellType

General or default

Spread does not export rich text formatted data to a cell format in Excel.

SliderCellType

General or Custom format

The cell contains the numeric value. Spread does not export to Excel objects.

TextCellType

General or Custom format

The cell contains the text.

Combo Box Cell Type Export

For a combo box cell type, by default, the value in the data model which is exported is the string of the selected item in the combo box. If you set the EditorValue property of the ComboBoxCellType to Index, then the index of the selected item is stored in the data model, and thus written out to Excel in the export. You would set the EditorValue to String if you wanted the string value. For more information, refer to the ComboBoxCellType in the Assembly Reference.

Multiple Option Cell Type Export

For a multiple option cell type, by default, the value in the data model which is exported is the string of the selected option. If you set the EditorValue property of the MultiOptionCellType to Index, then the index of the selected item is stored in the data model, and thus written out to Excel in the export. You would set the EditorValue to String if you wanted the string value. For more information, refer to the MultiOptionCellType in the Assembly Reference.

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.