|
2 weeks ago | |
---|---|---|
.. | ||
FAQ.md | 2 weeks ago | |
README.md | 2 weeks ago | |
api.md | 2 weeks ago | |
cell.md | 2 weeks ago | |
config.md | 2 weeks ago | |
contribute.md | 2 weeks ago | |
data.md | 2 weeks ago | |
operate.md | 2 weeks ago | |
resource.md | 2 weeks ago | |
sheet.md | 2 weeks ago |
Luckysheet is an online spreadsheet like excel that is powerful, simple to configure, and completely open source.
##,###0.00
, $1,234.56$##,###0.00_);[Red]($##,###0.00)
, _($* ##,###0.00_);_(...($* "-"_);_(@_)
, 08-05 PM 01:30MM-dd AM/PM hh:mm
)Node.js Version >= 6
npm install
npm install gulp -g
npm run dev
npm run build
There are two ways to introduce dependencies
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet/dist/plugins/css/pluginsCss.css' />
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet/dist/plugins/plugins.css' />
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet/dist/css/luckysheet.css' />
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet/dist/assets/iconfont/iconfont.css' />
<script src="https://cdn.jsdelivr.net/npm/luckysheet/dist/plugins/js/plugin.js"></script>
<script src="https://cdn.jsdelivr.net/npm/luckysheet/dist/luckysheet.umd.js"></script>
Note that the path of https://cdn.jsdelivr.net/npm/luckysheet/dist/luckysheet.umd.js
means that the latest luckysheet code will be pulled, but if Luckysheet has just been released, the jsdelivr website may not have time Synchronize from npm, so using this path will still pull to the previous version. We recommend that you directly specify the latest version.
To specify the Luckysheet version, please add the version number after all CDN dependent files, such as: https://cdn.jsdelivr.net/npm/luckysheet@2.1.12/dist/luckysheet.umd.js
.
How do I know which version is the latest version? View the latest release record or package.json
version
field.
If it is not convenient to access jsdelivr.net, you can also import it locally
After npm run build
, all files in the dist
folder are copied to the project directory
<link rel='stylesheet' href='./plugins/css/pluginsCss.css' />
<link rel='stylesheet' href='./plugins/plugins.css' />
<link rel='stylesheet' href='./css/luckysheet.css' />
<link rel='stylesheet' href='./assets/iconfont/iconfont.css' />
<script src="./plugins/js/plugin.js"></script>
<script src="./luckysheet.umd.js"></script>
Specify a table container
<div id="luckysheet" style="margin:0px;padding:0px;position:absolute;width:100%;height:100%;left: 0px;top: 0px;"></div>
Create a table
<script>
$(function () {
//Configuration item
var options = {
container: 'luckysheet' //luckysheet is the container id
}
luckysheet.create(options)
})
</script>
The data format of a complete Luckysheet table file is: luckysheetfile, a table file contains several sheet files, corresponding to excel sheet0, sheet1, etc.
An example of a Luckysheet file is as follows, the table contains 3 sheets:
luckysheetfile = [{sheet1 settings}, {sheet2 settings}, {sheet3 settings}]
Equivalent to 3 sheets of excel
An example of a sheet in the file is as follows:
luckysheetfile[0] =
{
"name": "Cell", //Worksheet name
"color": "", //Worksheet color
"config": {}, //Table row height, column width, merged cells, borders, hidden rows and other settings
"index": "0", //Worksheet index
"chart": [], //Chart configuration
"status": "1", //Activation status
"order": "0", //The order of the worksheet
"hide": 0,//whether to hide
"column": 18, //Number of columns
"row": 36, //number of rows
"celldata": [], //Original cell data set
"visibledatarow": [], //The position of all rows
"visibledatacolumn": [], //The position of all columns
"ch_width": 2322, //The width of the worksheet area
"rh_height": 949, //The height of the worksheet area
"scrollLeft": 0, //Left and right scroll bar position
"scrollTop": 315, //Up and down scroll bar position
"luckysheet_select_save": [], //selected area
"luckysheet_conditionformat_save": {},//Conditional format
"calcChain": [],//Formula chain
"isPivotTable":false,//Whether to pivot table
"pivotTable":{},//Pivot table settings
"filter_select": null,//Filter range
"filter": null,//Filter configuration
"luckysheet_alternateformat_save": [], //Alternate colors
"luckysheet_alternateformat_save_modelCustom": []//Customize alternate colors
}
View in chrome's console
luckysheet.getluckysheetfile()
You can see the complete settings
[{shee1}, {sheet2}, {sheet3}]
Keyboard shortcuts | Features |
---|---|
CTRL + C | Copy cell |
CTRL + V | Paste cell |
CTRL + X | Cut cell |
CTRL + Z | Undo |
CTRL + Y | Redo |
CTRL + A | Select all |
CTRL + B | Bold |
CTRL + F | Find |
CTRL + H | Replace |
CTRL + I | Italic |
CTRL + UP/DOWN/LEFT/RIGHT | Quickly adjust cell marquee |
SHIFT + UP/DOWN/LEFT/RIGHT | Adjust selection area |
CTRL + Left mouse click | Multiple selection cell |
SHIFT + Left mouse click | Adjust selection area |
UP/DOWN/LEFT/RIGHT | Move cell selection box |
ENTER | Edit cell |
TAB | Move cell selection box to the right |
DELETE | Clear cell data |
If you encounter problems with Luckysheet, follow the steps below to find the answer
If none of the above methods solve your problem, you can consider:
Recommended reading How To Ask Questions The Smart Way
At the same time, we strongly recommend you to help us enrich the Luckysheet community