Config

The configuration holds various properties to controls the behavior of the spreadsheet and the worksheets. There are two objects, one config for the spreadsheet and one config for each of the worksheets.

Documentation

Methods

The following methods would perform operations for the config programmatically.
MethodDescription
getConfig Get the configuration of one worksheet.
getConfig() => Object
setConfig Set the configuration for the worksheet
setConfig(options: Object) => void


Spreasheet config

One object is available for the spreadsheet level and holds all shared or global properties.
PropertyDescription
cloud: String Render a remote spreadsheet from Jspreadsheet Cloud.
application: String Your application name.
definedNames: Array Global variables
root: DOMElement DOM element for binding the javascript events. This property is normally used when JSS is running as a web component.
sorting: Function Custom sorting handler.
server: String URL from a remote server to handler data persistence.
toolbar: Boolean|Object True for the default toolbar, or a object with the custom toolbar configuration.
allowExport: Boolean Allow the download of the spreadsheet. Default: true
includeHeadersOnDownload: Boolean Download the headers within the data. Default: false
forceUpdateOnPaste: Boolean Force the update on readonly columns on paste. Default: false
loadingSpin: Boolean Show the loading spin on the spreadsheet initialization. Default: false
fullscreen: Boolean Start the spreadsheet on fullscreen mode. Default: false
secureFormulas: Boolean Run the secure formulas, it would force all method to upperCase. Default: true
parseFormulas: Boolean Parse formulas. Default: true
debugFormulas: Boolean Debug formulas. Default: false
editorFormulas: Boolean Open the formulas on edition mode. Default: true
autoIncrement: Boolean Auto increment cells on dragging or cloning. Default: true
autoCasting: Boolean Try to convert text into number to help on formulas. Default: true
stripHTML: Boolean Strip all HTML code. Default: true
tabs: Boolean Allow the user to add new worksheets. Default: false
allowDeleteWorksheet: Boolean Allow the user to delete worksheets. Default: true
allowRenameWorksheet: Boolean Allow the user to rename a worksheet. Default: true
allowMoveWorksheet: Boolean Allow the user to update the worksheet position on the tabs. Default: true
parseTableFirstRowAsHeader: Boolean When creating a spreadsheet from a table, the first row it would be the headers Default: false
parseTableAutoCellType: Boolean When creating a spreadsheet from a table, try to define a best column type. Default: false
plugins: Object Load plugins. Default: null.
wordWrap: Boolean Wordwrap Default: true.
license: String License hash. Can ge generate in your profile.


Worksheet options

There is one configuration for each worksheet.
PropertyDescription
url: String Load the data from a remove URL
persistence: Boolean|String Invoke a remote server on each spreadsheet update. True to send the information to the same URL above, or a define the URL for the persistence of this worksheet. Default: false
data: Array Load the data into a new spreadsheet from an array of rows or objects.
rows: Array Array with the rows properties settings such as title, height.
columns: Array Array with the columns properties settings. More about the column options.
cells: Object Cell definitions. More about the cell options.
role: String Meta information about the worksheet.
nestedHeaders: Array Nested headers
defaultColWidth: Number Default column width.
defaultRowHeight: Number Default row height.
defaultColAlign: String Default column alignment. Default: center
minSpareRows: Number Min number of spare rows. Default: null
minSpareCols: Number Min number of spare columns. Default: null
minDimensions: Array(Number, Number) Min number of columns and rows.
csv: String Load the data from a remove CSV file.
csvFileName: String Defines the name of the CSV file. Default: jspreadsheet
csvHeaders: Boolean Consider the first row from the CSV file as the headers. Default: false
csvDelimiter: String CSV divisor character. Default: ','
columnSorting: Boolean Allow column sorting. Default: true
columnDrag: Boolean Allow column dragging. Default: true
columnResize: Boolean Allow column resizing. Default: true
rowResize: Boolean Allow row resizing. Default: true
rowDrag: Boolean Allow row dragging. Default: true
rowDrag: Boolean Allow row dragging. Default: true
editable: Boolean The worksheet is editable. Default: true
allowInsertRow: Boolean Allow the user to insert new rows. Default: true
allowManualInsertRow: Boolean Allow the user to insert new rows with the enter key in the last row. Default: true
allowManualInsertRow: Boolean Allow the user to insert new rows with the enter key in the last row. Default: true
allowInsertColumn: Boolean Allow the user to insert new columns. Default: true
allowManualInsertColumn: Boolean Allow the user to insert new columns with the tab key in the last column. Default: true
allowDeleteRow: Boolean Allow row delete. Default: true
allowDeleteRow: Boolean Allow row delete. Default: true
allowDeleteColumn: Boolean Allow column delete. Default: true
allowRenameColumn: Boolean Allow rename column. Default: true
allowComments: Boolean Allow comments on cells. Default: true
selectionCopy: Boolean Show the cloning square cornerDefault: true
mergeCells: Object Merge cells information. Default: none
search: Object Show the search input filter box. Default: false
pagination: Boolean|Number False to disable pagination or a number to enable and define how many records per page. Default: false
paginationOptions: Array Show a dropdown so the user can change the default number of records per page. Default: null
textOverflow: Boolean Cell text overflow. Default: false
tableOverflow: Boolean The size of the viewport will be limited. Default: false
tableHeight: Number The height of the viewport, only used when tableOverflow is true. Default: 300
tableWidth: Number The width of the viewport, only used when tableOverflow is true. Default: null
comments: Object All the comments from the worksheet. Default: null
meta: Object All the meta information from the worksheet. Default: null
style: Object All the style information from the worksheet. Default: null
freezeColumns: Number The number of freeze columns on the worksheet. Default: 0
worksheetId: String Define a unique workshet identification. Default: 0
worksheetName: String Define the worksheet name. Default: Sheet1
filters: Boolean Enable the column filters. Default: false
footers: Array Worksheet footers definitions. Default: null
validations: Object Worksheet validations. Default: null