[{"data":1,"prerenderedAt":633},["ShallowReactive",2],{"quirekit-doc:\u002Fen\u002Fsheets\u002Fquick-start":3},{"id":4,"title":5,"body":6,"description":624,"extension":625,"keywords":626,"locale":237,"meta":627,"navigation":114,"order":51,"path":628,"section":629,"seo":630,"stem":631,"__hash__":632},"docs\u002Fsheets\u002Fquick-start.en.md","Sheets quick start",{"type":7,"value":8,"toc":619},"minimark",[9,14,31,38,69,210,225,229,259,294,298,313,594,597,608,615],[10,11,13],"h2",{"id":12},"dependencies-and-styles","Dependencies and styles",[15,16,17,18,22,23,26,27,30],"p",{},"Use ",[19,20,21],"code",{},"@quirekit\u002Fsheet-editor"," and the dependencies supplied with the same release. Within the repository, link the workspace package. For commercial distribution, use the compiled package. Sheets shares QuireKit design tokens and component styles with Classic. If your app already uses the QuireKit UnoCSS preset, you can use ",[19,24,25],{},"virtual:uno.css"," in place of ",[19,28,29],{},"quirekit.css",".",[15,32,33,34,37],{},"Use the following command with your configured commercial package registry. For offline delivery, use the supplied ",[19,35,36],{},".tgz"," path in place of the package name and install the dependencies supplied with that release.",[39,40,45],"pre",{"className":41,"code":42,"language":43,"meta":44,"style":44},"language-bash shiki shiki-themes github-light github-light github-dark","pnpm add @quirekit\u002Fsheet-editor @quirekit\u002Funocss-preset vue\n","bash","",[19,46,47],{"__ignoreMap":44},[48,49,52,56,60,63,66],"span",{"class":50,"line":51},"line",1,[48,53,55],{"class":54},"sgQzM","pnpm",[48,57,59],{"class":58},"s-HEn"," add",[48,61,62],{"class":58}," @quirekit\u002Fsheet-editor",[48,64,65],{"class":58}," @quirekit\u002Funocss-preset",[48,67,68],{"class":58}," vue\n",[39,70,75],{"className":71,"code":72,"filename":73,"language":74,"meta":44,"style":44},"language-ts shiki shiki-themes github-light github-light github-dark","import { Editor } from '@quirekit\u002Fsheet-editor'\nimport '@quirekit\u002Funocss-preset\u002Fquirekit.css'\nimport '@quirekit\u002Fsheet-editor\u002Fstyles.css'\n\nconst editor = new Editor({\n  locale: 'en',\n  licenseKey: import.meta.env.VITE_QUIREKIT_LICENSE_KEY,\n}).mount('#workbook')\n\neditor.setLocale('zh-CN')\n","main.ts","ts",[19,76,77,93,101,109,116,138,150,171,189,194],{"__ignoreMap":44},[48,78,79,83,87,90],{"class":50,"line":51},[48,80,82],{"class":81},"sDD9d","import",[48,84,86],{"class":85},"sVPnS"," { Editor } ",[48,88,89],{"class":81},"from",[48,91,92],{"class":58}," '@quirekit\u002Fsheet-editor'\n",[48,94,96,98],{"class":50,"line":95},2,[48,97,82],{"class":81},[48,99,100],{"class":58}," '@quirekit\u002Funocss-preset\u002Fquirekit.css'\n",[48,102,104,106],{"class":50,"line":103},3,[48,105,82],{"class":81},[48,107,108],{"class":58}," '@quirekit\u002Fsheet-editor\u002Fstyles.css'\n",[48,110,112],{"class":50,"line":111},4,[48,113,115],{"emptyLinePlaceholder":114},true,"\n",[48,117,119,122,126,129,132,135],{"class":50,"line":118},5,[48,120,121],{"class":81},"const",[48,123,125],{"class":124},"sUNQB"," editor",[48,127,128],{"class":81}," =",[48,130,131],{"class":81}," new",[48,133,134],{"class":54}," Editor",[48,136,137],{"class":85},"({\n",[48,139,141,144,147],{"class":50,"line":140},6,[48,142,143],{"class":85},"  locale: ",[48,145,146],{"class":58},"'en'",[48,148,149],{"class":85},",\n",[48,151,153,156,158,160,163,166,169],{"class":50,"line":152},7,[48,154,155],{"class":85},"  licenseKey: ",[48,157,82],{"class":81},[48,159,30],{"class":85},[48,161,162],{"class":124},"meta",[48,164,165],{"class":85},".env.",[48,167,168],{"class":124},"VITE_QUIREKIT_LICENSE_KEY",[48,170,149],{"class":85},[48,172,174,177,180,183,186],{"class":50,"line":173},8,[48,175,176],{"class":85},"}).",[48,178,179],{"class":54},"mount",[48,181,182],{"class":85},"(",[48,184,185],{"class":58},"'#workbook'",[48,187,188],{"class":85},")\n",[48,190,192],{"class":50,"line":191},9,[48,193,115],{"emptyLinePlaceholder":114},[48,195,197,200,203,205,208],{"class":50,"line":196},10,[48,198,199],{"class":85},"editor.",[48,201,202],{"class":54},"setLocale",[48,204,182],{"class":85},[48,206,207],{"class":58},"'zh-CN'",[48,209,188],{"class":85},[15,211,212,213,216,217,220,221,224],{},"Pass a selector or DOM element to ",[19,214,215],{},"mount()",". Give the container a height, such as ",[19,218,219],{},"#workbook { height: 100dvh; }",". The File menu can create a workbook, open an XLSX file, or change the interface language. Call ",[19,222,223],{},"editor.destroy()"," when the app unmounts.",[10,226,228],{"id":227},"language-and-theme","Language and theme",[15,230,17,231,234,235,238,239,242,243,246,247,250,251,254,255,258],{},[19,232,233],{},"zh-CN"," or ",[19,236,237],{},"en"," for ",[19,240,241],{},"locale",". The default is Simplified Chinese. Call ",[19,244,245],{},"editor.setLocale(locale)"," on a running editor. Use ",[19,248,249],{},"onLocaleChange"," to remember a language chosen from the File menu. The workbook, selection, undo history, and authored cell contents stay in the current session. Pass a ",[19,252,253],{},"QuireKitTheme"," through ",[19,256,257],{},"theme"," as you would in Classic.",[15,260,261,262,265,266,269,270,273,274,277,278,281,282,285,286,289,290,293],{},"In Vue, mount to a template element in ",[19,263,264],{},"onMounted"," and call ",[19,267,268],{},"destroy()"," in ",[19,271,272],{},"onBeforeUnmount",". You can also use ",[19,275,276],{},"SheetEditorWorkspace"," from ",[19,279,280],{},"@quirekit\u002Fsheet-editor\u002Fvue"," with ",[19,283,284],{},":owner-document=\"document\""," and ",[19,287,288],{},":options=\"options\"",". Update ",[19,291,292],{},"options.locale"," to change its language. In Nuxt, mount the editor on the client.",[10,295,297],{"id":296},"open-and-save-an-xlsx-file","Open and save an XLSX file",[15,299,300,301,304,305,308,309,312],{},"Pass ",[19,302,303],{},"{ name, bytes }"," for the initial file. Once mounted, use ",[19,306,307],{},"editor.session?.open({ name, bytes })"," to open another workbook. To manage storage in your app, return the save operation's promise from ",[19,310,311],{},"saveFile",". The editor updates its saved state after the operation succeeds. The default action downloads an XLSX file.",[39,314,317],{"className":71,"code":315,"filename":316,"language":74,"meta":44,"style":44},"import { Editor } from '@quirekit\u002Fsheet-editor'\n\nconst response = await fetch('\u002Ffiles\u002Forders.xlsx')\nif (!response.ok) throw new Error('Could not open the orders workbook')\n\nconst editor = new Editor({\n  initial: {\n    name: 'orders.xlsx',\n    bytes: new Uint8Array(await response.arrayBuffer()),\n  },\n  saveFile: async ({ bytes }) => {\n    const saved = await fetch('\u002Ffiles\u002Forders.xlsx', {\n      method: 'PUT',\n      headers: {\n        'Content-Type': 'application\u002Fvnd.openxmlformats-officedocument.spreadsheetml.sheet',\n      },\n      body: Uint8Array.from(bytes),\n    })\n    if (!saved.ok) throw new Error('Could not save the orders workbook')\n  },\n}).mount('#workbook')\n","files.ts",[19,318,319,329,333,355,384,388,402,407,417,442,447,475,497,508,514,527,533,544,550,576,581],{"__ignoreMap":44},[48,320,321,323,325,327],{"class":50,"line":51},[48,322,82],{"class":81},[48,324,86],{"class":85},[48,326,89],{"class":81},[48,328,92],{"class":58},[48,330,331],{"class":50,"line":95},[48,332,115],{"emptyLinePlaceholder":114},[48,334,335,337,340,342,345,348,350,353],{"class":50,"line":103},[48,336,121],{"class":81},[48,338,339],{"class":124}," response",[48,341,128],{"class":81},[48,343,344],{"class":81}," await",[48,346,347],{"class":54}," fetch",[48,349,182],{"class":85},[48,351,352],{"class":58},"'\u002Ffiles\u002Forders.xlsx'",[48,354,188],{"class":85},[48,356,357,360,363,366,369,372,374,377,379,382],{"class":50,"line":111},[48,358,359],{"class":81},"if",[48,361,362],{"class":85}," (",[48,364,365],{"class":81},"!",[48,367,368],{"class":85},"response.ok) ",[48,370,371],{"class":81},"throw",[48,373,131],{"class":81},[48,375,376],{"class":54}," Error",[48,378,182],{"class":85},[48,380,381],{"class":58},"'Could not open the orders workbook'",[48,383,188],{"class":85},[48,385,386],{"class":50,"line":118},[48,387,115],{"emptyLinePlaceholder":114},[48,389,390,392,394,396,398,400],{"class":50,"line":140},[48,391,121],{"class":81},[48,393,125],{"class":124},[48,395,128],{"class":81},[48,397,131],{"class":81},[48,399,134],{"class":54},[48,401,137],{"class":85},[48,403,404],{"class":50,"line":152},[48,405,406],{"class":85},"  initial: {\n",[48,408,409,412,415],{"class":50,"line":173},[48,410,411],{"class":85},"    name: ",[48,413,414],{"class":58},"'orders.xlsx'",[48,416,149],{"class":85},[48,418,419,422,425,428,430,433,436,439],{"class":50,"line":191},[48,420,421],{"class":85},"    bytes: ",[48,423,424],{"class":81},"new",[48,426,427],{"class":54}," Uint8Array",[48,429,182],{"class":85},[48,431,432],{"class":81},"await",[48,434,435],{"class":85}," response.",[48,437,438],{"class":54},"arrayBuffer",[48,440,441],{"class":85},"()),\n",[48,443,444],{"class":50,"line":196},[48,445,446],{"class":85},"  },\n",[48,448,450,453,456,459,462,466,469,472],{"class":50,"line":449},11,[48,451,452],{"class":54},"  saveFile",[48,454,455],{"class":85},": ",[48,457,458],{"class":81},"async",[48,460,461],{"class":85}," ({ ",[48,463,465],{"class":464},"sde8i","bytes",[48,467,468],{"class":85}," }) ",[48,470,471],{"class":81},"=>",[48,473,474],{"class":85}," {\n",[48,476,478,481,484,486,488,490,492,494],{"class":50,"line":477},12,[48,479,480],{"class":81},"    const",[48,482,483],{"class":124}," saved",[48,485,128],{"class":81},[48,487,344],{"class":81},[48,489,347],{"class":54},[48,491,182],{"class":85},[48,493,352],{"class":58},[48,495,496],{"class":85},", {\n",[48,498,500,503,506],{"class":50,"line":499},13,[48,501,502],{"class":85},"      method: ",[48,504,505],{"class":58},"'PUT'",[48,507,149],{"class":85},[48,509,511],{"class":50,"line":510},14,[48,512,513],{"class":85},"      headers: {\n",[48,515,517,520,522,525],{"class":50,"line":516},15,[48,518,519],{"class":58},"        'Content-Type'",[48,521,455],{"class":85},[48,523,524],{"class":58},"'application\u002Fvnd.openxmlformats-officedocument.spreadsheetml.sheet'",[48,526,149],{"class":85},[48,528,530],{"class":50,"line":529},16,[48,531,532],{"class":85},"      },\n",[48,534,536,539,541],{"class":50,"line":535},17,[48,537,538],{"class":85},"      body: Uint8Array.",[48,540,89],{"class":54},[48,542,543],{"class":85},"(bytes),\n",[48,545,547],{"class":50,"line":546},18,[48,548,549],{"class":85},"    })\n",[48,551,553,556,558,560,563,565,567,569,571,574],{"class":50,"line":552},19,[48,554,555],{"class":81},"    if",[48,557,362],{"class":85},[48,559,365],{"class":81},[48,561,562],{"class":85},"saved.ok) ",[48,564,371],{"class":81},[48,566,131],{"class":81},[48,568,376],{"class":54},[48,570,182],{"class":85},[48,572,573],{"class":58},"'Could not save the orders workbook'",[48,575,188],{"class":85},[48,577,579],{"class":50,"line":578},20,[48,580,446],{"class":85},[48,582,584,586,588,590,592],{"class":50,"line":583},21,[48,585,176],{"class":85},[48,587,179],{"class":54},[48,589,182],{"class":85},[48,591,185],{"class":58},[48,593,188],{"class":85},[15,595,596],{},"Your app provides the file endpoints in this example. Users can also open local XLSX files from the File menu and process them entirely in the browser.",[15,598,599,600,604,605,607],{},"Choose ",[601,602,603],"strong",{},"File → Export → CSV (current sheet)"," to download the current worksheet's displayed values. The UTF-8 file uses the worksheet name and includes hidden rows and columns and the current formula results. The browser delivers the CSV directly. The host's ",[19,606,311],{}," callback handles XLSX saves.",[15,609,610],{},[611,612,614],"a",{"href":613},"\u002Fen\u002Fsheets\u002Flicense","Configure commercial licensing",[616,617,618],"style",{},"html pre.shiki code .sgQzM, html code.shiki .sgQzM{--shiki-default:#6F42C1;--shiki-light:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s-HEn, html code.shiki .s-HEn{--shiki-default:#032F62;--shiki-light:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sDD9d, html code.shiki .sDD9d{--shiki-default:#D73A49;--shiki-light:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVPnS, html code.shiki .sVPnS{--shiki-default:#24292E;--shiki-light:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sUNQB, html code.shiki .sUNQB{--shiki-default:#005CC5;--shiki-light:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sde8i, html code.shiki .sde8i{--shiki-default:#E36209;--shiki-light:#E36209;--shiki-dark:#FFAB70}",{"title":44,"searchDepth":95,"depth":95,"links":620},[621,622,623],{"id":12,"depth":95,"text":13},{"id":227,"depth":95,"text":228},{"id":296,"depth":95,"text":297},"Mount the Excel editor and configure locale, theme, XLSX files, and a save callback.","md",null,{},"\u002Fen\u002Fsheets\u002Fquick-start","Sheets",{"title":5,"description":624},"sheets\u002Fquick-start.en","eq_b7eti2q9hL9VE3zZeboupazEdrqY71xbObOvPWUs",1796438336629]