This table summarizes how the cell settings are handled when SpreadJS imports data from an Excel file. The properties are members of the GC.Spread.Sheets.CellRange class unless specifically noted otherwise.
Excel Setting | SpreadJS Setting | Remarks |
Cell color or pattern | Cell.backColor or Cell.foreColor | SpreadJS reads the color setting from Excel and assigns color based on the setting of each cell’s individual setting. Fill patterns are supported. |
Cell borders | Cell.borderLeft, borderTop, borderRight, borderBottom | SpreadJS imports borders. SpreadJS sets the color to the color used in Excel. |
Cell value | Cell.value or Cell.text | SpreadJS imports cell contents as the Value and displays it using the size specified by the Font property. |
Cell ThemeFont, Fonts, font types | Cell.font | SpreadJS loads the cell fonts from Excel. |
Cell Horizontal and vertical text alignment | Cell.hAlign or Cell.vAlign | SpreadJS imports this setting from Excel. |
Cell Locked | Cell.locked | SpreadJS imports the Excel setting. Note the default value of the Lock property is True for all cells in Excel. |
Cell Shrink to fit | Cell.shrinkToFit | SpreadJS imports this setting from Excel. |
Cell WordWrap | Cell.wordWrap | SpreadJS imports this setting from Excel. |
Cell TextIndent | Cell.textIndent | SpreadJS imports this setting from Excel. |
Cell Format | Cell.formatter | SpreadJS imports all the Excel cell formats to the General cell type and assigns the formats as closely as possible by setting the NumberFormat, DateTimeFormat, and FormatString properties. |
Cell Validator | Cell.validator | SpreadJS imports the Excel cell validator to DefaultDataValidator and assigns the validator as closely as possible by setting the different types of Validator properties. |