## **<spanstyle="font-size:20px;">Q</span>** What is the difference between data and celldata in luckysheetfile?
**<spanstyle="font-size:20px;">A</span>**: Use one-dimensional array format [celldata](/zh/guide/sheet.html#celldata), after the initialization is completed, the data converted into a two-dimensional array format is used for storage and update, and celldata is no longer used.
**<spanstyle="font-size:20px;">A</span>**: Use one-dimensional array format [celldata](/guide/sheet.html#celldata), after the initialization is completed, the data converted into a two-dimensional array format is used for storage and update, and celldata is no longer used.
If you need to take out `data` as initial data, you need to execute [transToCellData(data)](/guide/api.html#transtocelldata-data-setting) to convert it to celldata data.
Among them, the celldata in `{ r, c, v }` format is converted to a two-dimensional array using [transToData(celldata)](/guide/api.html#transtodata-celldata-setting)
@ -20,7 +20,7 @@ luckysheet.transToData(celldata)
## **<spanstyle="font-size:20px;">Q</span>** What are the cell types?
**<spanstyle="font-size:20px;">A</span>**: Refer to [Cell Format List](/zh/guide/cell.html), with examples of available cell formats
**<spanstyle="font-size:20px;">A</span>**: Refer to [Cell Format List](/guide/cell.html), with examples of available cell formats
## **<spanstyle="font-size:20px;">Q</span>** Why will the formula in the table not be triggered after initialization?
**<spanstyle="font-size:20px;">A</span>** : Refer to [Table data format](/zh/guide/sheet.html#calcchain) ,just set the calcChain corresponding to the cell data.
**<spanstyle="font-size:20px;">A</span>** : Refer to [Table data format](/guide/sheet.html#calcchain) ,just set the calcChain corresponding to the cell data.
------------
## **<spanstyle="font-size:20px;">Q</span>** Is the remote loading data loadUrl or updateUrl?
**<spanstyle="font-size:20px;">A</span>**: [loadUrl](/zh/guide/config.html#loadurl). Configure loadUrl, Luckysheet will request the entire table data through ajax, and updateUrl will be used as the interface address for collaborative editing in real-time saving.
**<spanstyle="font-size:20px;">A</span>**: [loadUrl](/guide/config.html#loadurl). Configure loadUrl, Luckysheet will request the entire table data through ajax, and updateUrl will be used as the interface address for collaborative editing in real-time saving.
Note: Initial data needs to be configured with loadUrl and loadSheetUrl parameters, while for collaborative editing, the four parameters of loadUrl, loadSheetUrl, updateUrl and allowUpdate can be configured to take effect.
------------
@ -90,14 +90,14 @@ refer this article:
## **<spanstyle="font-size:20px;">Q</span>** How to monitor cell hover or click events? how to monitor `cellRenderAfter` in real-time?
## **<spanstyle="font-size:20px;">Q</span>** How to customize the top toolbar?
**<spanstyle="font-size:20px;">A</span>** :
reference: [options.showtoolbarconfig](/zh/guide/config.html#showtoolbarconfig)(TODO means waiting to developed)
reference: [options.showtoolbarconfig](/guide/config.html#showtoolbarconfig)(TODO means waiting to developed)
------------
@ -113,7 +113,7 @@ if you want to remove jQuery in `Luckysheet`, you can find `jQuery` in source co
## **<spanstyle="font-size:20px;">Q</span>** How to add a field to a cell object?
**<spanstyle="font-size:20px;">A</span>** reference [cell object format](/zh/guide/cell.html),then read this annotation[src/controllers/postil.js](https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/postil.js)。the annotation is a configuration in a cell object.
**<spanstyle="font-size:20px;">A</span>** reference [cell object format](/guide/cell.html),then read this annotation[src/controllers/postil.js](https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/postil.js)。the annotation is a configuration in a cell object.
------------
@ -121,7 +121,7 @@ if you want to remove jQuery in `Luckysheet`, you can find `jQuery` in source co
**<spanstyle="font-size:20px;">A</span>** The luckysheet use iconfont icon in this project, if any icon cannot be loaded ,plz check your iconfont.css. we are so sorry that we did not describe it clearly in the old version documents.
Now the documents have been updated.[official documents](/zh/guide/#使用步骤)
Now the documents have been updated.[official documents](/guide/#steps-for-usage)
------------
@ -140,7 +140,7 @@ more information:[Luckyexcel](https://github.com/mengshukeji/Luckyexcel/)
## **<spanstyle="font-size:20px;">Q</span>** How to disable editing of cells?How to open sheet protection?
**<spanstyle="font-size:20px;">A</span>** Sheet protection includes disable editing of cells that you need to make some configurations on each sheets. `config.authority`, the latest configurations[sheet protection](/zh/guide/sheet.html#config-authority)。
**<spanstyle="font-size:20px;">A</span>** Sheet protection includes disable editing of cells that you need to make some configurations on each sheets. `config.authority`, the latest configurations[sheet protection](/guide/sheet.html#config-authority)。
In order to make it easier for you to understand the function of sheet protection, the following video shows how to make the whole sheet uneditable, but allow a column of cells to be edited:
@ -152,7 +152,7 @@ In you local browser, you can open the control pannel, use `luckysheet.getLuckys
## **<spanstyle="font-size:20px;">Q</span>** How to configure data validation?
**<spanstyle="font-size:20px;">A</span>** there is the configuration of data validation,[data validation](/zh/guide/sheet.html#dataVerification)。Also there is the API that you can use `data validation` in any time. [setDataVerification](/zh/guide/api.html#setdataverification-optionitem-setting).
**<spanstyle="font-size:20px;">A</span>** there is the configuration of data validation,[data validation](/guide/sheet.html#dataVerification)。Also there is the API that you can use `data validation` in any time. [setDataVerification](/guide/api.html#setdataverification-optionitem-setting).
------------
@ -181,6 +181,30 @@ if you want to get the position of the picture, you can overlap the picture with
**<spanstyle="font-size:20px;">A</span>** There are two ways to get it
- 1. use `luckysheet.getLuckysheetfile()` to get all configuration data, so you can get the `defaultRowHeight` and `defaultColWidth` in the sheet configuration data。
- 2. use API to get the default row height [getDefaultRowHeight](/zh/guide/api.html#getdefaultrowheight-setting) and column width.[getDefaultColWidth](/zh/guide/api.html#getdefaultcolwidth-setting)
- 2. use API to get the default row height [getDefaultRowHeight](/guide/api.html#getdefaultrowheight-setting) and column width.[getDefaultColWidth](/guide/api.html#getdefaultcolwidth-setting)
------------
## **<spanstyle="font-size:20px;">Q</span>** How to hide the add row button and the back to top button below the worksheet?
**<spanstyle="font-size:20px;">A</span>** Configuration is open
Return all worksheet configurations, the format is the same as the worksheet configuration, and the results obtained can be used as options.data when the form is initialized.
Therefore, this API is suitable for manually operating and configuring a table, and then taking out all the worksheet information to save it, and then use it for table creation in other places. If you want to get all the workbook data including the workbook configuration, you can use [toJson](#toJson())
Therefore, this API is suitable for manually operating and configuring a table, and then taking out all the worksheet information to save it, and then use it for table creation in other places. If you want to get all the workbook data including the workbook configuration, it is recommended to use [toJson](#toJson()), and it can be directly used to initialize Luckysheet.
- **Usage**:
@ -2568,8 +2568,6 @@ Use note:
### toJson()
[todo]
- **Explanation**:
The exported json string can be directly used as the parameter `options` when the workbook is initialized by `luckysheet.create(options)`. The usage scenario is to manually save all the parameters after the user manipulates the table, and then initialize the table elsewhere. Use, similar to the import and export of a luckysheet proprietary format.
- Allow back to top [enableAddBackTop](#enableAddBackTop)
- User Info [userInfo](#userInfo)
- User Information Menu [userMenuItem](#userMenuItem)
- Back button link [myFolderUrl](#myFolderUrl)
@ -73,8 +71,8 @@ The following are all supported setting parameters
- Refresh formula [forceCalculation](#forceCalculation)
- Custom cell right-click menu [cellRightClickConfig](#cellRightClickConfig)
- Customize the right-click menu of the bottom sheet bar [sheetRightClickConfig](#sheetRightClickConfig)
- Whether to show the row number area [showRowBar](#showRowBar)
- Whether to show the column number area [showColumnBar](#showColumnBar)
- The width of the row header area [rowHeaderWidth](#rowHeaderWidth)
- The height of the column header area [columeHeaderHeight](#columeHeaderHeight)
- Whether to show the formula bar [sheetFormulaBar](#sheetFormulaBar)
- Initialize the default font size [defaultFontSize](#defaultFontSize)
@ -350,21 +348,6 @@ Note that you also need to configure `loadUrl` and `loadSheetUrl` to take effect
}
```
------------
### sheetBottomConfig
[todo]
- Type: Object
- Default: {}
- Usage: Add row button and back to top button configuration below the worksheet
- Format:
```json
{
addRow: false, // Add row button
backTop: false // Back to the top
}
------------
### allowEdit
- Type: Boolean
- Default: true
@ -377,10 +360,10 @@ Note that you also need to configure `loadUrl` and `loadSheetUrl` to take effect
- Usage: Allow additional rows
------------
### enableAddCol
### enableAddBackTop
- Type: Boolean
- Default: true
- Usage: Allow adding columns
- Usage: Allow back to top
------------
### userInfo
@ -439,27 +422,61 @@ Note that you also need to configure `loadUrl` and `loadSheetUrl` to take effect
------------
### cellRightClickConfig
[todo]
- Type: Object
- Default: {}
- Usage: Custom configuration cell right-click menu
- Format:
```json
- Format:
```json
{
copy: false, //Copy
copyAs: false, //Copy as
paste: false, //Paste
insert: false, //Insert
delete: false, //Delete
hide: false, //Hide
deleteCell: false, //Delete cell
clear: false, //Clear content
matrix: false, //Matrix operation selection
sort: false, //Sort selection
filter: false, //Filter selection
chart: false //Chart generation
}
copy: false, // copy
copyAs: false, // copy as
paste: false, // paste
insertRow: false, // insert row
insertColumn: false, // insert column
deleteRow: false, // delete the selected row
deleteColumn: false, // delete the selected column
deleteCell: false, // delete cell
hideRow: false, // hide the selected row and display the selected row
hideColumn: false, // hide the selected column and display the selected column
rowHeight: false, // row height
columnWidth: false, // column width
clear: false, // clear content
matrix: false, // matrix operation selection
sort: false, // sort selection
filter: false, // filter selection
chart: false, // chart generation
image: false, // insert picture
link: false, // insert link
data: false, // data verification
cellFormat: false // Set cell format
}
```
In addition to the cells, the configuration here also includes the row header right-click menu, the column header right-click menu, and the column header drop-down arrow menu. The specific configuration relationships are as follows:
|Right-click menu configuration|Cell|Row header|Column header|Column arrow|
|hideRow|Hide the selected row and show the selected row|Hide the selected row and show the selected row|-|-|
|hideColumn|Hide the selected column and show the selected column|-|Hide the selected column and show the selected column|Hide the selected column and show the selected column|