@8sheets/data-grid 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/api/serialize.js +1 -1
- package/calc/engine.js +1 -1
- package/calc/functions/info.js +1 -1
- package/calcx/lang/convert.js +1 -1
- package/cells/book-css.js +7 -2
- package/cells/cf-engine.js +1 -1
- package/cells/find-engine.js +2 -2
- package/cells/find.js +1 -1
- package/cells/goto.js +1 -1
- package/cells/link-model.js +1 -0
- package/cells/selection-modes.js +1 -1
- package/celltypes/dropdowns.js +2 -2
- package/core/cond-format.js +1 -1
- package/core/culture.js +1 -1
- package/core/edit-ranges.js +1 -0
- package/core/host-rules.js +1 -0
- package/core/protection.js +1 -1
- package/core/sheet.js +1 -1
- package/core/structure.js +1 -1
- package/core/workbook.js +1 -1
- package/datasheets/manager.js +1 -1
- package/datasheets/persist.js +1 -1
- package/extras/getdata/persist.js +2 -2
- package/i18n/en/cells.js +1 -1
- package/i18n/en/format.js +1 -1
- package/i18n/en/misc.js +1 -1
- package/i18n/en/ribbon.js +1 -1
- package/i18n/pl/cells.js +1 -1
- package/i18n/pl/format.js +1 -1
- package/i18n/pl/misc.js +1 -1
- package/i18n/pl/ribbon.js +1 -1
- package/io/client.js +1 -1
- package/io/csv.js +7 -7
- package/io/encoding.js +1 -0
- package/io/foreign-sheets.js +2 -2
- package/io/plan.js +1 -1
- package/io/xlsx-tail.js +1 -1
- package/io/xlsx-write.js +2 -2
- package/package.json +1 -1
- package/pivot/engine.js +1 -1
- package/pivot/xml.js +2 -2
- package/print/note-pages.js +2 -0
- package/print/paginate.js +1 -1
- package/print/pdf-links.js +1 -0
- package/print/pdf.js +11 -11
- package/print/render-page.js +3 -3
- package/table-view/files.js +1 -1
- package/table-view/mount.js +1 -1
- package/table-view/version.js +1 -1
- package/ui/dialogs.js +3 -3
- package/ui/icons.js +1 -1
- package/ui/protection-ui.js +1 -1
package/core/workbook.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{expandBareTables as ue}from"../slicers/structured.js";import{syncTableHeaders as fe,tablesOf as de}from"./tables.js";import{BOOL as D,CHUNK_BITS as z,CHUNK_MASK as W,EMPTY as I,ERR as U,ERRORS as me,FORMULA as F,DIRTY as J,EVALUATING as Z,KIND_MASK as Y,NUM as P,Sheet as B,SPILL as pe,STR as T}from"./sheet.js";import{cellRef as ge,isValidName as ye,MAX_COLS as R,MAX_ROWS as X,quoteSheetName as Q,rangeRef as Se,renameSheetInFormula as V,sheetReferencePattern as ee}from"./address.js";import{translateFormula as we}from"./formula-refs.js";import{sheetStem as te}from"./default-names.js";import{StringTable as Ce}from"./strings.js";import{formatAxis as se,formatSheetColumns as ve}from"./axis-styles.js";import{autoRowHeight as ke}from"./row-fit.js";import{StyleTable as xe}from"./styles.js";import{cellEntryText as ne,parseInput as ie}from"./input.js";import{DATE_1904_OFFSET as _e}from"./numfmt.js";import{noteChanges as oe}from"./changes.js";import{overrideRuns as Re}from"../cells/rich-runs.js";import{sheetRenameHooks as be}from"./sparse.js";import{shiftRuleFormulas as re}from"../cells/cf-file.js";import{expandStructured as Me,formulaEntryLimit as Fe,FormulaSyntaxError as L,tokenize as Te,toDisplayFormula as le,toFileFormula as Ae}from"../calc/parser.js";const Ee=200,Ie=new Set(["entry","clear","format","borders","fill"]);class Oe{constructor(){this.ids=new Int32Array(1024),this.list=[]}set(t,e){if(t>=this.ids.length){let o=this.ids.length*2;for(;o<=t;)o*=2;const r=new Int32Array(o);r.set(this.ids),this.ids=r}const i=this.list.length;(i===0||this.list[i-1]!==e)&&this.list.push(e),this.ids[t]=this.list.length}get(t){const e=t<this.ids.length?this.ids[t]:0;return e===0?void 0:this.list[e-1]}}class ${constructor(){this.capacity=1024,this.count=0,this.rows=new Uint32Array(this.capacity),this.cols=new Uint16Array(this.capacity),this.kinds=new Uint8Array(this.capacity),this.styles=new Uint16Array(this.capacity),this.values=new Float64Array(this.capacity),this.formulas=null,this.vms=null}_grow(){const t=this.capacity*2,e=(i,o)=>{const r=new i(t);return r.set(o),r};this.rows=e(Uint32Array,this.rows),this.cols=e(Uint16Array,this.cols),this.kinds=e(Uint8Array,this.kinds),this.styles=e(Uint16Array,this.styles),this.values=e(Float64Array,this.values),this.capacity=t}push(t,e,i){this.count===this.capacity&&this._grow();const o=this.count++,r=t.kind(e,i)&~(J|Z);if(this.rows[o]=e,this.cols[o]=i,this.kinds[o]=r,this.styles[o]=t.cellStyle(e,i),this.values[o]=t.value(e,i),r&F&&(this.formulas===null&&(this.formulas=new Oe),this.formulas.set(o,t.formula(e,i))),t.valueMeta!==null){const s=t.valueMeta.get(e*R+i);s!==void 0&&(this.vms??=new Map).set(o,s)}}}class Qe{get namesChanged(){return this._namesChanged}set namesChanged(t){this._namesChanged=t,t&&(this.namesRevision=(this.namesRevision??0)+1)}constructor(){this.sheets=[new B(`${te()}1`)],this.activeSheet=0,this.date1904=!1,this.strings=new Ce,this.styles=new xe,this.undoStack=[],this.redoStack=[],this.listeners=new Set,this.source=null,this.formulasEdited=!1,this.edits=0,this._dirty=!1,this.engine=null,this.selectedSheets=null}get sheet(){return this.sheets[this.activeSheet]}get dateOffset(){return this.date1904?_e:0}get dirty(){return this._dirty}set dirty(t){t&&this.edits++,this._dirty=!!t}onChange(t){this.listeners.add(t)}clearHistory(){if(this.historyCleared=(this.historyCleared??0)+1,!(this.undoStack.length===0&&this.redoStack.length===0)){this.undoStack.length=0,this.redoStack.length=0;for(const t of this.listeners)t("history")}}_emit(t){(t==="cells"||t==="bulk")&&(this.formatValueRevision=(this.formatValueRevision??0)+1),this.dirty=!0;for(const e of this.listeners)e(t)}addSheet(t){const e=te();let i=1,o=t??`${e}${i}`;const r=n=>this.sheets.some(l=>l.name.toLowerCase()===n.toLowerCase());for(;r(o);)o=`${e}${++i}`;const s=new B(o);return this.sheets.push(s),this.activeSheet=this.sheets.length-1,this.engine?.sheetsChanged(),this._emit("sheets"),s}deleteSheet(t){return this.sheets.filter(e=>!e.hidden).length<=1?!1:(this._shrink3D(t),this._refErrorsFor(t),this._removeSheet(t))}_removeSheet(t){if(this.sheets.length<=1)return!1;const[e]=this.sheets.splice(t,1);if(this.selectedSheets?.delete(e),this._forgetSheet(e,t),this.engine)for(const[o,r]of this.engine.tables)r.sheet===e&&this.engine.tables.delete(o);this._reindexNames(o=>o===t?-1:o>t?o-1:o),this.activeSheet>=this.sheets.length&&(this.activeSheet=this.sheets.length-1);const i=this.activeSheet;for(;this.sheets[this.activeSheet].hidden&&(this.activeSheet=(this.activeSheet+1)%this.sheets.length,this.activeSheet!==i););return this.structureEdited=!0,this.engine?.sheetsChanged(),this.engine?.rebuild(),this._emit("sheets"),!0}_forgetSheet(t,e){const i=r=>r.sheet===t||r.sheet===void 0&&r.sheetIndex===e||(r.extra?.parts??[]).some(i),o=r=>{r.sheetIndex>e&&r.sheetIndex--;for(const s of r.extra?.parts??[])o(s)};for(const r of[this.undoStack,this.redoStack]){const s=r.filter(n=>!i(n));s.forEach(o),r.splice(0,r.length,...s)}}moveSheet(t,e){if(t===e)return;const i=this.sheet,[o]=this.sheets.splice(t,1);this.sheets.splice(e,0,o),this.activeSheet=this.sheets.indexOf(i);const r=n=>n===t?e:t<e?n>t&&n<=e?n-1:n:n>=e&&n<t?n+1:n,s=n=>{n.sheetIndex=r(n.sheetIndex);for(const l of n.extra?.parts??[])s(l)};for(const n of this.undoStack)s(n);for(const n of this.redoStack)s(n);this.structureEdited=!0,this._reindexNames(r),this.engine?.orderChanged(),this._emit("sheets")}_copyTables(t,e){const i=new Map,o=new Set;for(const r of de(this,t)){const{sheet:s,part:n,id:l,source:c,sheetIndex:a,...h}=r;let u=this.engine.tables.size+i.size+2,p,f;do{const d=String(u++),g=r.name.slice(0,255-d.length);p=g+d,ye(p)||(p=g.slice(0,254-d.length)+"_"+d),f=p.toUpperCase()}while(o.has(f)||this.engine.tables.has(f)||this.engine.names.has(f));o.add(f),i.set(r.name.toUpperCase(),{...A(h),name:p,sheet:e,isNew:!0,dirty:!0})}return i}_copyScopedNames(t,e,i,o){const{engine:r}=this;if(!r||r.names.size===0)return;const s=`${t}!`;let n=!1;for(const[l,c]of[...r.names])l.startsWith(s)&&(r.names.set(`${t+1}!${l.slice(s.length)}`,{...c,text:o(V(c.text,e.name,i.name))}),n=!0);n&&(this.namesChanged=!0)}_reindexNames(t){const{engine:e}=this;if(!e||e.names.size===0)return;const i=[];let o=!1;for(const[r,s]of e.names){const n=r.indexOf("!"),l=n<0?0:t(Number(r.slice(0,n)));n>=0&&l!==Number(r.slice(0,n))&&(o=!0),n<0?i.push([r,s]):l>=0&&i.push([`${l}!${r.slice(n+1)}`,s])}if(o){e.names.clear();for(const[r,s]of i)e.names.set(r,s);e.nameTemplates.clear(),this.namesChanged=!0,e.rebuild()}}duplicateSheet(t){const e=this.sheets[t];let o=`${e.name} (2)`,r=2;for(;this.sheets.some(h=>h.name.toLowerCase()===o.toLowerCase());)o=`${e.name} (${++r})`;const s=new B(o),n=this._copyTables(e,s),l=h=>Ue(h,n,e.name,s.name);for(const h of n.values())for(const u of h.totals??[])u?.formula&&(u.formula=l(u.formula));e.columns.forEach((h,u)=>{const p=[];h.forEach((f,d)=>{p[d]={kinds:f.kinds.slice(),values:f.values.slice(),styles:f.styles?f.styles.slice():null}}),s.columns[u]=p}),s.maxRow=e.maxRow,s.maxCol=e.maxCol,s.rows=e.rows.shifted(0,0),s.cols=e.cols.shifted(0,0);const c=new Map;e.formulas.forEachCell((h,u,p)=>{let f=c.get(p);f===void 0&&(f={...p,tpl:void 0},p.f!==void 0&&(f.f=l(p.f)),p.sf!==void 0&&(f.sf=l(p.sf)),c.set(p,f)),s.setFormula(h,u,f)}),s.merges=e.merges.map(h=>({...h})),s.rowStyles=e.rowStyles?new Map(e.rowStyles):null,s.colStyles=e.colStyles?new Map(e.colStyles):null,s.frozenRows=e.frozenRows,s.frozenCols=e.frozenCols,s.showGridlines=e.showGridlines,s.cellTypeRules=e.cellTypeRules,s.cellTypes=e.cellTypes?new Map(e.cellTypes):null,s.sparkRules=e.sparkRules,s.cellDropdowns=e.cellDropdowns?new Map(e.cellDropdowns):null,s.cellTags=e.cellTags?new Map(e.cellTags):null,s.cellButtons=e.cellButtons?new Map(e.cellButtons):null,s.cellStates=e.cellStates?e.cellStates.slice():null,s.autoMerges=e.autoMerges?e.autoMerges.map(h=>({...h})):null,s.background=e.background,s.outlineColumn=e.outlineColumn?{...e.outlineColumn}:null,s.frozenTrailingRows=e.frozenTrailingRows,s.frozenTrailingCols=e.frozenTrailingCols,s.hideZeros=e.hideZeros,s.hideHeadings=e.hideHeadings,s.isChartSheet=e.isChartSheet,s.hideOutline=e.hideOutline,s.gridColorId=e.gridColorId,s.areaOffset=e.areaOffset,s.selectionPolicy=e.selectionPolicy,s.selectionUnit=e.selectionUnit,s.gridlineAxes=e.gridlineAxes,s.gridColor=e.gridColor,s.tabStyles=e.tabStyles;const a=A;if(s.cf=a(e.cf),s.validations=a(e.validations),n.size){for(const h of s.cf??[])h.rules=h.rules.map(u=>re(u,l));for(const h of s.validations??[])h.formula1&&(h.formula1=l(h.formula1)),h.formula2&&(h.formula2=l(h.formula2))}s.comments=a(e.comments),s.threads=a(e.threads),s.hyperlinks=e.hyperlinks?e.hyperlinks.map(h=>({...a({...h,_ranges:void 0})})):e.hyperlinks,s.autoFilter=a(e.autoFilter),s.filteredRows=e.filteredRows?new Set(e.filteredRows):e.filteredRows,s.pageSetup=a(e.pageSetup),s.tabColor=e.tabColor,s.protection=a(e.protection),s.rtl=e.rtl,s.zoom=e.zoom,s.valueMeta=e.valueMeta?new Map(e.valueMeta):null,s.colsChanged=!0,s.viewChanged=!0,this.sheets.splice(t+1,0,s);for(const h of n.values())this.engine.tables.set(h.name.toUpperCase(),h);return this.activeSheet=t+1,this._reindexNames(h=>h>t?h+1:h),this._copyScopedNames(t,e,s,l),this.structureEdited=!0,this.engine?.sheetsChanged(),this.engine?.rebuild(),this._emit("sheets"),s}sheetNameProblem(t,e){const i=e.trim().slice(0,31);return!i||/[\\/?*[\]:]/.test(i)||/^'|'$/.test(i)?"rules":i.toLowerCase()==="history"?"reserved":this.sheets.some((o,r)=>r!==t&&o.name.toLowerCase()===i.toLowerCase())?"taken":null}renameSheet(t,e){const i=e.trim().slice(0,31);if(this.sheetNameProblem(t,e)!==null)return!1;const o=this.sheets[t].name;this.sheets[t].name=i,this.engine?.sheetsChanged(),this._renameInFormulas(o,i);for(const r of be)r(this,o,i);return this._emit("sheets"),!0}_shrink3D(t){const e=this.sheets[t].name.toLowerCase(),i=l=>this.sheets.findIndex(c=>c.name.toLowerCase()===l.toLowerCase()),o=l=>l[0]==="'"?l.slice(1,-1).replace(/''/g,"'"):l,r=/((?:'(?:[^']|'')+'|[A-Za-z_\u00C0-\uFFFF][\w.\u00C0-\uFFFF]*)):((?:'(?:[^']|'')+'|[A-Za-z_\u00C0-\uFFFF][\w.\u00C0-\uFFFF]*))!/g,s=l=>l.replace(r,(c,a,h,u)=>{if(l[u-1]==="]")return c;const p=o(a),f=o(h);if(p.toLowerCase()!==e&&f.toLowerCase()!==e)return c;let d=i(p),g=i(f);if(d<0||g<0||(d>g&&([d,g]=[g,d]),d===t&&d++,g===t&&g--,d>g))return c;const y=w=>Q(this.sheets[w].name);return d===g?`${y(d)}!`:`${y(d)}:${y(g)}!`}),n=l=>l.includes(":")&&l.includes("!")?l.split(/("(?:[^"]|"")*")/).map((c,a)=>a%2?c:s(c)).join(""):l;for(const l of this.sheets){const c=new Map;l.formulas.forEachCell((a,h,u)=>{let p=c.get(u);if(p===void 0){const f=u.f??u.sf,d=typeof f=="string"?n(f):f;p=d===f?null:u.f!==void 0?{...u,f:d,tpl:void 0}:{...u,sf:d,tpl:void 0},c.set(u,p)}p!==null&&l.setFormula(a,h,p)})}for(const l of this.engine?.names.values()??[])typeof l.text=="string"&&(l.text=n(l.text));this.engine?.templates.clear()}_refErrorsFor(t){const e=ee(this.sheets[t].name),i=s=>s.split(/("(?:[^"]|"")*")/).map((n,l)=>l%2?n:n.replace(e,"#REF!")).join(""),o=s=>typeof s=="string"&&s!==""?i(s):s,r=this.sheets[t];for(const s of this.sheets){if(s===r)continue;s.cf?.length>0&&(s.cf=s.cf.map(l=>({...l,rules:l.rules.map(c=>re(c,o))})),s.cfChanged=!0,s.cfEval?.invalidate()),s.validations?.length>0&&(s.validations=s.validations.map(l=>({...l,formula1:o(l.formula1),formula2:o(l.formula2)})),s.validationsChanged=!0);const n=new Map;s.formulas.forEachCell((l,c,a)=>{let h=n.get(a);if(h===void 0){const u=a.f??a.sf,p=typeof u=="string"?i(u):u;h=p===u?null:a.f!==void 0?{...a,f:p,tpl:void 0}:{...a,sf:p,tpl:void 0},n.set(a,h)}h!==null&&(s.setFormula(l,c,h),this.formulasEdited=!0)})}for(const s of this.engine?.names.values()??[])typeof s.text=="string"&&(s.text=i(s.text));this.engine?.templates.clear()}_renameInFormulas(t,e){const i=ee(t);let o=!1;for(const s of this.sheets){const n=new Map;s.formulas.forEachCell((l,c,a)=>{let h=n.get(a);if(h===void 0){const u=a.f??a.sf;if(u===void 0||!i.test(u))i.lastIndex=0,h=null;else{i.lastIndex=0;const p=V(u,t,e);h=a.f!==void 0?{...a,f:p,tpl:void 0}:{...a,sf:p,tpl:void 0}}n.set(a,h)}h!==null&&(s.setFormula(l,c,h),o=!0)})}let r=!1;for(const s of this.engine?.names.values()??[]){if(typeof s.text!="string")continue;const n=V(s.text,t,e);n!==s.text&&(s.text=n,r=!0)}r&&(this.namesChanged=!0,this.engine.nameTemplates.clear()),(o||r)&&(o&&(this.formulasEdited=!0),this.engine?.templates.clear(),this.engine?.rebuild())}editText(t,e,i){const o=t.kind(e,i);if(this.engine?.dataTables.length){const n=this.engine.dataTableAt(t,e,i);if(n){const{info:l}=n,c=l.dt2D==="1",a=l.dtr==="1";return`{=TABLE(${c||a?l.r1:""},${c?l.r2:a?"":l.r1})}`}}if(o&pe&&this.engine){const n=this.engine.spillMaster(t,e,i);if(n)return this.editText(t,n.row,n.col)}if(o&F){const n=t.formula(e,i),l=n&&!n.typed&&n.t!=="array"&&n.tpl?.rangeResult?"=@":"=";if(n&&n.f!==void 0){const c=l+le(n.f);return n.t==="array"&&!n.cm?`{${c}}`:c}if(n&&n.sf!==void 0){const c=Math.floor(n.base/R),a=n.base-c*R;return l+le(we(n.sf,e-c,i-a))}}const r=o&Y;if(r===I)return"";const s=t.value(e,i);if(r===U&&t.valueMeta!==null&&!(o&F)){const n=this.richImages?.get(t.valueMeta.get(e*R+i));if(n!==void 0)return n.alt??"";const l=this.richValues?.indexOfVm(t.valueMeta.get(e*R+i))??-1,c=l>=0?this.richValues.view(l):null;if(c!==null)return c.text}return r===T?this.styles.get(t.style(e,i)).quotePrefix?`'${this.strings.get(s)}`:this.strings.get(s):r===D?s?"TRUE":"FALSE":r===U?me[s]??"#N/A":String(s)}transact(t,e,i=null){if(this.guard&&!this.guard(t))return;const o=this.selectedSheets;!i&&o?.size>1&&Ie.has(t)&&(i=this.sheets.filter(s=>o.has(s)&&(!s.protection||s===this.sheet)));const r=i?this._runGroup(t,e,i):this._runOn(this.sheet,t,e);r!==null&&this._pushUndo(r)}transactOn(t,e,i){const o=this._runOn(t,e,i);o!==null&&this._pushUndo(o)}_runOn(t,e,i){const o=new $,r={sheet:t,log:o,saveCell:(f,d)=>o.push(t,f,d)},{maxRow:s,maxCol:n}=t,l=this.recorder?.length,c=this.formulasEdited;let a;try{a=i(r)??null}catch(f){throw f instanceof L&&(ae(t,o),t.maxRow=s,t.maxCol=n,this.formulasEdited=c,l!==void 0&&(this.recorder.length=l),this.engine?.cellsChanged(t,o.rows,o.cols,o.count)),f}e!=="entry"&&this.engine?.presentationChanged(),t.changes!==null&&o.count>0&&oe(this,t,o),o.vms!==null&&ze(t,o);const h=o.count>0&&this.engine?.tables.size>0?fe(this,r,o):null,u=(f,d)=>g=>u(f(g),d(g)),p=a&&h?u(a,h):a??h;return o.count===0&&p===null?null:(t.revision++,this.engine?.cellsChanged(t,o.rows,o.cols,o.count),{sheetIndex:t===this.sheet?this.activeSheet:this.sheets.indexOf(t),sheet:t,log:o,label:e,extra:p})}_runGroup(t,e,i){const o=[],r=this.activeSheet,s=this.recorder?.length,n=this.formulasEdited,l=[];try{for(const c of i){const{maxRow:a,maxCol:h}=c,u=this._runOn(c,t,e);u!==null&&(o.push(u),l.push([c,a,h]))}}catch(c){if(c instanceof L){this.rollbackSlices(o);for(const[a,h,u]of l)a.maxRow=h,a.maxCol=u;this.activeSheet=r,this.formulasEdited=n,s!==void 0&&(this.recorder.length=s)}throw c}return o.length===0?null:{sheetIndex:this.activeSheet,sheet:this.sheet,log:new $,label:t,extra:H(this,o)}}runSlice(t,e,i){const o=this._runOn(t,e,i);return o!==null&&this._emit("cells"),o}pushFolded(t,e,i){t.length!==0&&this._pushUndo({sheetIndex:this.sheets.indexOf(i),sheet:i,log:new $,label:e,extra:H(this,t)})}rollbackSlices(t){for(let e=t.length-1;e>=0;e--)this._restore(t[e]);this._emit("cells")}_pushUndo(t){this.allowUndo===!1?this.undoStack.length=0:(this.undoStack.push(t),this.undoStack.length>(this.historyLimit??Ee)&&this.undoStack.shift()),this.redoStack.length=0,this._emit("cells")}_restore(t){const e=t.sheet??this.sheets[t.sheetIndex],{log:i}=t,o=new $;if(ae(e,i,o),i.vms!==null){e.valueMeta=new Map(e.valueMeta??[]);for(const[n,l]of i.vms)e.valueMeta.set(i.rows[n]*R+i.cols[n],l)}let r=null;t.extra&&(r=t.extra(e)),this.engine?.presentationChanged(),e.changes!==null&&i.count>0&&oe(this,e,o),e.revision++,this.engine?.cellsChanged(e,i.rows,i.cols,i.count);const s=this.sheets.indexOf(e);return s>=0&&(this.activeSheet=s),{sheetIndex:s>=0?s:t.sheetIndex,sheet:e,log:o,label:t.label,extra:r}}undo(){const t=this.undoStack.pop();return t?(this.redoStack.push(this._restore(t)),this._emit("cells"),!0):!1}redo(){const t=this.redoStack.pop();return t?(this.undoStack.push(this._restore(t)),this._emit("cells"),!0):!1}setInput(t,e,i,o,{overLimitAsText:r=!1,typedQuote:s=!0}={}){const{sheet:n}=t,l=n.style(e,i),c=o!==""&&this.styles.get(l).numFmt==="@";let a=c?{kind:T,text:o[0]==="'"?o.slice(1):o}:ie(o,void 0,this.dateOffset);if(a.kind===F){const u=Fe(a.formula);if(u){if(!r)throw new L(u);a={kind:T,text:o}}}if(this.recorder){const u=a.kind===T&&o.startsWith("=")&&!c?`'${o}`:o;this.recorder.push(`sheet.setValue(${JSON.stringify(ge(e,i))}, ${JSON.stringify(u)});`)}t.saveCell(e,i),n.setFormula(e,i,null);const h=s&&o[0]==="'"&&o.length>1;switch((h||this.styles.get(l).quotePrefix)&&n.setStyle(e,i,this.styles.derive(l,{quotePrefix:h})),a.kind){case I:n.setCell(e,i,I,0);break;case P:n.setCell(e,i,P,a.value),a.format&&this.styles.get(l).numFmt==="General"&&n.setStyle(e,i,this.styles.derive(n.style(e,i),{numFmt:a.format}));break;case D:n.setCell(e,i,D,a.value);break;case U:n.setCell(e,i,U,a.value);break;case F:n.setCell(e,i,F|I,0),n.setFormula(e,i,{f:Ae(this._expandTableRefs(ue(a.formula,this.engine?.tables),n,e,i),this.engine?.names??null),typed:this.dynamicArrays!==!1}),this.formulasEdited=!0;break;default:n.setCell(e,i,T,this.strings.add(ne(a.text)))}}setRichInput(t,e,i,o,r){const{sheet:s}=t;t.saveCell(e,i),s.setFormula(e,i,null);const n=ne(o);s.setCell(e,i,T,this.strings.addRich(n,n===o?r:r?.filter(l=>l.at<n.length)))}_expandTableRefs(t,e,i,o){const r=this.engine;return!r||r.tables.size===0?t:Me(t,()=>{for(const s of r.tables.values())if(s.sheet===e&&i>=s.r0&&i<=s.r1&&o>=s.c0&&o<=s.c1)return s;return null})}clearRange(t,e="contents",{visibleOnly:i=!1}={}){this.sheet.dataRanges?.cleared(t)||this.transact("clear",o=>{const{sheet:r}=o,s=[];if(e!=="contents")for(const{r0:l,c0:c,r1:a,c1:h}of t){const u=l===0&&a===X-1,p=c===0&&h===R-1,f=(d,g,y,w)=>{for(const[C,x]of[...g])C<y||C>w||(s.push([d,C,x]),g.delete(C))};u&&r.colStyles!==null&&f("col",r.colStyles,c,h),p&&r.rowStyles!==null&&f("row",r.rowStyles,l,a)}const n=i&&r.filteredRows?.size>0?r.filteredRows:null;for(const{r0:l,c0:c,r1:a,c1:h}of t){const u=Math.min(h,r.maxCol),p=Math.min(a,r.maxRow);for(let f=c;f<=u;f++)if(r.columns[f]!==void 0)for(let d=l;d<=p;d++){if(r._chunk(d,f)===void 0){d|=1023;continue}if(n!==null&&n.has(d))continue;const y=r.kind(d,f)!==0,w=r.cellStyle(d,f)!==0;if(e==="formats"){if(!w)continue;o.saveCell(d,f),r.setStyle(d,f,0);continue}!y&&!(e==="all"&&w)||(o.saveCell(d,f),r.setCell(d,f,I,0),r.setFormula(d,f,null),e==="all"&&r.setStyle(d,f,0))}}return s.length>0?j([],s):void 0})}applyStyle(t,e,{measureRow:i,numberFit:o}={}){const r=JSON.stringify(e);if(this.recorder)for(const s of t)this.recorder.push(`sheet.setFormat(${JSON.stringify(Se(s))}, ${r});`);this.transact("format",s=>{const{sheet:n}=s;this.strings.rich!==null&&Re(this,s,t,e);const l=[],c=new Set,a=[],h=[],u=(g,y,w)=>{const C=g*2048+y;c.has(C)||(c.add(C),l.push(g,y,w.styles===null?null:w.styles.slice()))},p=(g,y,w)=>{w===0&&(n.rowStyles?.has(g)||n.colStyles?.has(y))&&(w=this.styles.explicitDefault()),n.setStyle(g,y,w)};for(const{r0:g,c0:y,r1:w,c1:C}of t){const x=g===0&&w===X-1,v=y===0&&C===R-1,k=x||v,b=k?Math.min(w,n.maxRow):w,he=k?Math.min(C,n.maxCol):C;for(let S=y;S<=he&&g<=b;S++){const _=n.columns[S];if(!(k&&!_))for(let M=g>>>z;M<=b>>>z;M++){const G=M<<z,K=Math.max(g,G),ce=Math.min(b,G+W),N=k?_[M]:n._ensure(K,S);if(!(k&&!N?.styles)){u(S,M,N);for(let E=K;E<=ce;E++)(!k||N.styles[E&W])&&p(E,S,this.styles.derive(n.style(E,S),e,r))}}}const O=S=>this.styles.derive(S,e,r),q=(S,_,M)=>{u(_,S>>>z,n._ensure(S,_)),n.setStyle(S,_,M||this.styles.explicitDefault())};if(v&&x){ve(n,O,a);for(const[S,_]of n.rowStyles??[])a.push(["row",S,_]),n.rowStyles.set(S,O(_))}else if(x)for(let S=y;S<=C;S++)se(n,"col",S,O,a,q);else if(v)for(let S=g;S<=w;S++)se(n,"row",S,O,a,q)}const f=(g,y,w)=>{const C=n[g];w!==C.sizeOf(y)&&(h.push([g,y,C.isCustom(y)?C.sizeOf(y):null,C.isAuto(y)]),C.setSize(y,w,!0),g==="cols"&&(n.colsChanged=!0))},d=e.fontSize!==void 0||e.wrap!==void 0||e.rotation!==void 0||["justify","distributed"].includes(e.hAlign)||["justify","distributed"].includes(e.vAlign);for(const{r0:g,r1:y,c0:w,c1:C}of t){const x=Math.min(y,n.maxRow);if(d&&x-g<=2e3)for(let v=g;v<=x;v++)f("rows",v,ke(n,this,v,i));if(o)for(const v of o.cols){if(v<w||v>C||!n.columns[v]||n.cols.isCustom(v)&&!n.cols.isAuto(v))continue;let k=n.cols.sizeOf(v);for(const b of o.rows)b>=g&&b<=x&&(n.kind(b,v)&Y)===P&&(k=Math.max(k,o.measure(n,b,v)));f("cols",v,k)}}return j(l,a,h)})}}function ae(m,t,e){for(let i=t.count-1;i>=0;i--){const o=t.rows[i],r=t.cols[i];e?.push(m,o,r),m.setCell(o,r,t.kinds[i],t.values[i]),m.setStyle(o,r,t.styles[i]),m.setFormula(o,r,t.kinds[i]&F?t.formulas.get(i):null)}}function H(m,t){const e=()=>{const i=[];for(let o=t.length-1;o>=0;o--)i.push(m._restore(t[o]));return H(m,i)};return e.parts=t,e}function ze(m,t){let e=null;for(const i of t.vms.keys()){const o=t.rows[i],r=t.cols[i];(m.kind(o,r)&~(J|Z))===t.kinds[i]&&m.value(o,r)===t.values[i]||(e??=new Map(m.valueMeta),e.delete(o*R+r))}e!==null&&(m.valueMeta=e.size>0?e:null)}function Ue(m,t,e,i){if(!t.size||typeof m!="string")return m;let o;try{o=Te(m)}catch(n){if(n instanceof L)return m;throw n}let r="",s=0;for(let n=0;n<o.length;n++){const l=o[n],c=l.t==="name"?m.slice(l.s,l.e):l.t==="table"?l.v.name:null;if(!c)continue;const a=t.get(c.toUpperCase());if(!a)continue;let h=n-1;for(;o[h]?.t==="ws";)h--;const u=o[h];if(u?.t==="sheet"){const{book:p,sheet:f,sheet2:d}=u.v;if(p!==null||d!==null)continue;if(f.toUpperCase()===e.toUpperCase())r+=m.slice(s,u.s)+Q(i)+"!",s=u.e;else if(f.toUpperCase()!==i.toUpperCase())continue}r+=m.slice(s,l.s)+a.name,s=l.s+c.length}return s?r+m.slice(s):m}function A(m){if(m===null||typeof m!="object")return m;if(Array.isArray(m))return m.map(A);if(m instanceof Map)return new Map([...m].map(([e,i])=>[e,A(i)]));if(m instanceof Set)return new Set([...m].map(A));if(ArrayBuffer.isView(m))return m.slice();const t={};for(const[e,i]of Object.entries(m))!e.startsWith("_")&&typeof i!="function"&&(t[e]=A(i));return t}function j(m,t,e=[]){return i=>{const o=[];for(let n=0;n<m.length;n+=3){const l=m[n],c=m[n+1],a=i.columns[l]?.[c];a!==void 0&&(o.push(l,c,a.styles),a.styles=m[n+2])}const r=[];for(let n=t.length-1;n>=0;n--){const[l,c,a]=t[n];if(l==="columns"){r.push([l,c,i.colStyles]),i.colStyles=a,i.colsChanged=!0;continue}l==="col"&&(i.colsChanged=!0);const h=l==="col"?"colStyles":"rowStyles",u=i[h]??=new Map;r.push([l,c,u.get(c)]),a===void 0?u.delete(c):u.set(c,a)}const s=[];for(let n=e.length-1;n>=0;n--){const[l,c,a,h]=e[n],u=i[l];s.push([l,c,u.isCustom(c)?u.sizeOf(c):null,u.isAuto(c)]),u.setSize(c,a,h),l==="cols"&&(i.colsChanged=!0)}return j(o,r,s)}}export{$ as CellLog,Ie as GROUP_LABELS,Qe as Workbook,H as foldEntries,ie as parseInput,j as swapStyles};
|
|
1
|
+
import{expandBareTables as de}from"../slicers/structured.js";import{syncTableHeaders as me,tablesOf as pe}from"./tables.js";import{BOOL as P,CHUNK_BITS as U,CHUNK_MASK as W,EMPTY as O,ERR as L,ERRORS as ge,FORMULA as F,DIRTY as Z,EVALUATING as Y,KIND_MASK as X,NUM as B,Sheet as V,SPILL as ye,STR as E}from"./sheet.js";import{cellRef as Se,isValidName as we,MAX_COLS as R,MAX_ROWS as Q,quoteSheetName as ee,rangeRef as Ce,renameSheetInFormula as $,sheetReferencePattern as te}from"./address.js";import{translateFormula as ve}from"./formula-refs.js";import{sheetStem as se}from"./default-names.js";import{StringTable as ke}from"./strings.js";import{formatAxis as ne,formatSheetColumns as xe}from"./axis-styles.js";import{autoRowHeight as _e}from"./row-fit.js";import{StyleTable as Re}from"./styles.js";import{cellEntryText as ie,parseInput as oe}from"./input.js";import{DATE_1904_OFFSET as be}from"./numfmt.js";import{noteChanges as re}from"./changes.js";import{overrideRuns as Me}from"../cells/rich-runs.js";import{mapHostRules as le,rewriteHostEntry as ae}from"./host-rules.js";import{sheetRenameHooks as Fe}from"./sparse.js";import{shiftRuleFormulas as I}from"../cells/cf-file.js";import{expandStructured as Ee,formulaEntryLimit as Te,FormulaSyntaxError as N,tokenize as Ae,toDisplayFormula as he,toFileFormula as Oe}from"../calc/parser.js";const Ie=200,ze=new Set(["entry","clear","format","borders","fill"]);class Ue{constructor(){this.ids=new Int32Array(1024),this.list=[]}set(s,e){if(s>=this.ids.length){let o=this.ids.length*2;for(;o<=s;)o*=2;const r=new Int32Array(o);r.set(this.ids),this.ids=r}const i=this.list.length;(i===0||this.list[i-1]!==e)&&this.list.push(e),this.ids[s]=this.list.length}get(s){const e=s<this.ids.length?this.ids[s]:0;return e===0?void 0:this.list[e-1]}}class D{constructor(){this.capacity=1024,this.count=0,this.rows=new Uint32Array(this.capacity),this.cols=new Uint16Array(this.capacity),this.kinds=new Uint8Array(this.capacity),this.styles=new Uint16Array(this.capacity),this.values=new Float64Array(this.capacity),this.formulas=null,this.vms=null}_grow(){const s=this.capacity*2,e=(i,o)=>{const r=new i(s);return r.set(o),r};this.rows=e(Uint32Array,this.rows),this.cols=e(Uint16Array,this.cols),this.kinds=e(Uint8Array,this.kinds),this.styles=e(Uint16Array,this.styles),this.values=e(Float64Array,this.values),this.capacity=s}push(s,e,i){this.count===this.capacity&&this._grow();const o=this.count++,r=s.kind(e,i)&~(Z|Y);if(this.rows[o]=e,this.cols[o]=i,this.kinds[o]=r,this.styles[o]=s.cellStyle(e,i),this.values[o]=s.value(e,i),r&F&&(this.formulas===null&&(this.formulas=new Ue),this.formulas.set(o,s.formula(e,i))),s.valueMeta!==null){const t=s.valueMeta.get(e*R+i);t!==void 0&&(this.vms??=new Map).set(o,t)}}}function Le(f,s,e){const i=t=>typeof t=="string"&&t!==""?$(t,s,e):t;le(f,ae(i,I));const o=f.cf?.map(t=>{const n=t.rules.map(l=>I(l,i));return JSON.stringify(n)===JSON.stringify(t.rules)?t:{...t,rules:n}});o?.some((t,n)=>t!==f.cf[n])&&(f.cf=o,f.cfChanged=!0,f.cfEval?.invalidate());const r=f.validations?.map(t=>{const n=i(t.formula1),l=i(t.formula2);return n===t.formula1&&l===t.formula2?t:{...t,formula1:n,formula2:l}});r?.some((t,n)=>t!==f.validations[n])&&(f.validations=r,f.validationsChanged=!0)}class nt{get namesChanged(){return this._namesChanged}set namesChanged(s){this._namesChanged=s,s&&(this.namesRevision=(this.namesRevision??0)+1)}constructor(){this.sheets=[new V(`${se()}1`)],this.activeSheet=0,this.date1904=!1,this.strings=new ke,this.styles=new Re,this.undoStack=[],this.redoStack=[],this.listeners=new Set,this.source=null,this.formulasEdited=!1,this.edits=0,this._dirty=!1,this.engine=null,this.selectedSheets=null}get sheet(){return this.sheets[this.activeSheet]}get dateOffset(){return this.date1904?be:0}get dirty(){return this._dirty}set dirty(s){s&&this.edits++,this._dirty=!!s}onChange(s){this.listeners.add(s)}clearHistory(){if(this.historyCleared=(this.historyCleared??0)+1,!(this.undoStack.length===0&&this.redoStack.length===0)){this.undoStack.length=0,this.redoStack.length=0;for(const s of this.listeners)s("history")}}_emit(s){(s==="cells"||s==="bulk")&&(this.formatValueRevision=(this.formatValueRevision??0)+1),this.dirty=!0;for(const e of this.listeners)e(s)}addSheet(s){const e=se();let i=1,o=s??`${e}${i}`;const r=n=>this.sheets.some(l=>l.name.toLowerCase()===n.toLowerCase());for(;r(o);)o=`${e}${++i}`;const t=new V(o);return this.sheets.push(t),this.activeSheet=this.sheets.length-1,this.engine?.sheetsChanged(),this._emit("sheets"),t}deleteSheet(s){return this.sheets.filter(e=>!e.hidden).length<=1?!1:(this._shrink3D(s),this._refErrorsFor(s),this._removeSheet(s))}_removeSheet(s){if(this.sheets.length<=1)return!1;const[e]=this.sheets.splice(s,1);if(this.selectedSheets?.delete(e),this._forgetSheet(e,s),this.engine)for(const[o,r]of this.engine.tables)r.sheet===e&&this.engine.tables.delete(o);this._reindexNames(o=>o===s?-1:o>s?o-1:o),this.activeSheet>=this.sheets.length&&(this.activeSheet=this.sheets.length-1);const i=this.activeSheet;for(;this.sheets[this.activeSheet].hidden&&(this.activeSheet=(this.activeSheet+1)%this.sheets.length,this.activeSheet!==i););return this.structureEdited=!0,this.engine?.sheetsChanged(),this.engine?.rebuild(),this._emit("sheets"),!0}_forgetSheet(s,e){const i=r=>r.sheet===s||r.sheet===void 0&&r.sheetIndex===e||(r.extra?.parts??[]).some(i),o=r=>{r.sheetIndex>e&&r.sheetIndex--;for(const t of r.extra?.parts??[])o(t)};for(const r of[this.undoStack,this.redoStack]){const t=r.filter(n=>!i(n));t.forEach(o),r.splice(0,r.length,...t)}}moveSheet(s,e){if(s===e)return;const i=this.sheet,[o]=this.sheets.splice(s,1);this.sheets.splice(e,0,o),this.activeSheet=this.sheets.indexOf(i);const r=n=>n===s?e:s<e?n>s&&n<=e?n-1:n:n>=e&&n<s?n+1:n,t=n=>{n.sheetIndex=r(n.sheetIndex);for(const l of n.extra?.parts??[])t(l)};for(const n of this.undoStack)t(n);for(const n of this.redoStack)t(n);this.structureEdited=!0,this._reindexNames(r),this.engine?.orderChanged(),this._emit("sheets")}_copyTables(s,e){const i=new Map,o=new Set;for(const r of pe(this,s)){const{sheet:t,part:n,id:l,source:c,sheetIndex:a,...h}=r;let u=this.engine.tables.size+i.size+2,p,d;do{const m=String(u++),g=r.name.slice(0,255-m.length);p=g+m,we(p)||(p=g.slice(0,254-m.length)+"_"+m),d=p.toUpperCase()}while(o.has(d)||this.engine.tables.has(d)||this.engine.names.has(d));o.add(d),i.set(r.name.toUpperCase(),{...T(h),name:p,sheet:e,isNew:!0,dirty:!0})}return i}_copyScopedNames(s,e,i,o){const{engine:r}=this;if(!r||r.names.size===0)return;const t=`${s}!`;let n=!1;for(const[l,c]of[...r.names])l.startsWith(t)&&(r.names.set(`${s+1}!${l.slice(t.length)}`,{...c,text:o($(c.text,e.name,i.name))}),n=!0);n&&(this.namesChanged=!0)}_reindexNames(s){const{engine:e}=this;if(!e||e.names.size===0)return;const i=[];let o=!1;for(const[r,t]of e.names){const n=r.indexOf("!"),l=n<0?0:s(Number(r.slice(0,n)));n>=0&&l!==Number(r.slice(0,n))&&(o=!0),n<0?i.push([r,t]):l>=0&&i.push([`${l}!${r.slice(n+1)}`,t])}if(o){e.names.clear();for(const[r,t]of i)e.names.set(r,t);e.nameTemplates.clear(),this.namesChanged=!0,e.rebuild()}}duplicateSheet(s){const e=this.sheets[s];let o=`${e.name} (2)`,r=2;for(;this.sheets.some(h=>h.name.toLowerCase()===o.toLowerCase());)o=`${e.name} (${++r})`;const t=new V(o),n=this._copyTables(e,t),l=h=>Ne(h,n,e.name,t.name);for(const h of n.values())for(const u of h.totals??[])u?.formula&&(u.formula=l(u.formula));e.columns.forEach((h,u)=>{const p=[];h.forEach((d,m)=>{p[m]={kinds:d.kinds.slice(),values:d.values.slice(),styles:d.styles?d.styles.slice():null}}),t.columns[u]=p}),t.maxRow=e.maxRow,t.maxCol=e.maxCol,t.rows=e.rows.shifted(0,0),t.cols=e.cols.shifted(0,0);const c=new Map;e.formulas.forEachCell((h,u,p)=>{let d=c.get(p);d===void 0&&(d={...p,tpl:void 0},p.f!==void 0&&(d.f=l(p.f)),p.sf!==void 0&&(d.sf=l(p.sf)),c.set(p,d)),t.setFormula(h,u,d)}),t.merges=e.merges.map(h=>({...h})),t.rowStyles=e.rowStyles?new Map(e.rowStyles):null,t.colStyles=e.colStyles?new Map(e.colStyles):null,t.frozenRows=e.frozenRows,t.frozenCols=e.frozenCols,t.showGridlines=e.showGridlines,t.cellTypeRules=e.cellTypeRules,t.cellTypes=e.cellTypes?new Map(e.cellTypes):null,t.sparkRules=e.sparkRules,e.protectedRanges&&(t.protectedRanges=e.protectedRanges,t.protectedRangesChanged=!0),t.cellDropdowns=e.cellDropdowns?new Map(e.cellDropdowns):null,t.cellTags=e.cellTags?new Map(e.cellTags):null,t.cellButtons=e.cellButtons?new Map(e.cellButtons):null,t.cellStates=e.cellStates?e.cellStates.slice():null,t.autoMerges=e.autoMerges?e.autoMerges.map(h=>({...h})):null,t.background=e.background,t.outlineColumn=e.outlineColumn?{...e.outlineColumn}:null,t.frozenTrailingRows=e.frozenTrailingRows,t.frozenTrailingCols=e.frozenTrailingCols,t.hideZeros=e.hideZeros,t.hideHeadings=e.hideHeadings,t.isChartSheet=e.isChartSheet,t.hideOutline=e.hideOutline,t.gridColorId=e.gridColorId,t.areaOffset=e.areaOffset,t.selectionPolicy=e.selectionPolicy,t.selectionUnit=e.selectionUnit,t.gridlineAxes=e.gridlineAxes,t.gridColor=e.gridColor,t.tabStyles=e.tabStyles;const a=T;if(t.cf=a(e.cf),t.validations=a(e.validations),n.size){for(const h of t.cf??[])h.rules=h.rules.map(u=>I(u,l));for(const h of t.validations??[])h.formula1&&(h.formula1=l(h.formula1)),h.formula2&&(h.formula2=l(h.formula2))}t.comments=a(e.comments),t.threads=a(e.threads),t.hyperlinks=e.hyperlinks?e.hyperlinks.map(h=>({...a({...h,_ranges:void 0})})):e.hyperlinks,t.autoFilter=a(e.autoFilter),t.filteredRows=e.filteredRows?new Set(e.filteredRows):e.filteredRows,t.pageSetup=a(e.pageSetup),t.tabColor=e.tabColor,t.protection=a(e.protection),t.rtl=e.rtl,t.zoom=e.zoom,t.valueMeta=e.valueMeta?new Map(e.valueMeta):null,t.colsChanged=!0,t.viewChanged=!0,this.sheets.splice(s+1,0,t);for(const h of n.values())this.engine.tables.set(h.name.toUpperCase(),h);return this.activeSheet=s+1,this._reindexNames(h=>h>s?h+1:h),this._copyScopedNames(s,e,t,l),this.structureEdited=!0,this.engine?.sheetsChanged(),this.engine?.rebuild(),this._emit("sheets"),t}sheetNameProblem(s,e){const i=e.trim().slice(0,31);return!i||/[\\/?*[\]:]/.test(i)||/^'|'$/.test(i)?"rules":i.toLowerCase()==="history"?"reserved":this.sheets.some((o,r)=>r!==s&&o.name.toLowerCase()===i.toLowerCase())?"taken":null}renameSheet(s,e){const i=e.trim().slice(0,31);if(this.sheetNameProblem(s,e)!==null)return!1;const o=this.sheets[s].name;this.sheets[s].name=i,this.engine?.sheetsChanged(),this._renameInFormulas(o,i);for(const r of this.sheets)Le(r,o,i);for(const r of Fe)r(this,o,i);return this._emit("sheets"),!0}_shrink3D(s){const e=this.sheets[s].name.toLowerCase(),i=l=>this.sheets.findIndex(c=>c.name.toLowerCase()===l.toLowerCase()),o=l=>l[0]==="'"?l.slice(1,-1).replace(/''/g,"'"):l,r=/((?:'(?:[^']|'')+'|[A-Za-z_\u00C0-\uFFFF][\w.\u00C0-\uFFFF]*)):((?:'(?:[^']|'')+'|[A-Za-z_\u00C0-\uFFFF][\w.\u00C0-\uFFFF]*))!/g,t=l=>l.replace(r,(c,a,h,u)=>{if(l[u-1]==="]")return c;const p=o(a),d=o(h);if(p.toLowerCase()!==e&&d.toLowerCase()!==e)return c;let m=i(p),g=i(d);if(m<0||g<0||(m>g&&([m,g]=[g,m]),m===s&&m++,g===s&&g--,m>g))return c;const y=w=>ee(this.sheets[w].name);return m===g?`${y(m)}!`:`${y(m)}:${y(g)}!`}),n=l=>l.includes(":")&&l.includes("!")?l.split(/("(?:[^"]|"")*")/).map((c,a)=>a%2?c:t(c)).join(""):l;for(const l of this.sheets){const c=new Map;l.formulas.forEachCell((a,h,u)=>{let p=c.get(u);if(p===void 0){const d=u.f??u.sf,m=typeof d=="string"?n(d):d;p=m===d?null:u.f!==void 0?{...u,f:m,tpl:void 0}:{...u,sf:m,tpl:void 0},c.set(u,p)}p!==null&&l.setFormula(a,h,p)})}for(const l of this.engine?.names.values()??[])typeof l.text=="string"&&(l.text=n(l.text));this.engine?.templates.clear()}_refErrorsFor(s){const e=te(this.sheets[s].name),i=t=>t.split(/("(?:[^"]|"")*")/).map((n,l)=>l%2?n:n.replace(e,"#REF!")).join(""),o=t=>typeof t=="string"&&t!==""?i(t):t,r=this.sheets[s];for(const t of this.sheets){if(t===r)continue;le(t,ae(o,I)),t.cf?.length>0&&(t.cf=t.cf.map(l=>({...l,rules:l.rules.map(c=>I(c,o))})),t.cfChanged=!0,t.cfEval?.invalidate()),t.validations?.length>0&&(t.validations=t.validations.map(l=>({...l,formula1:o(l.formula1),formula2:o(l.formula2)})),t.validationsChanged=!0);const n=new Map;t.formulas.forEachCell((l,c,a)=>{let h=n.get(a);if(h===void 0){const u=a.f??a.sf,p=typeof u=="string"?i(u):u;h=p===u?null:a.f!==void 0?{...a,f:p,tpl:void 0}:{...a,sf:p,tpl:void 0},n.set(a,h)}h!==null&&(t.setFormula(l,c,h),this.formulasEdited=!0)})}for(const t of this.engine?.names.values()??[])typeof t.text=="string"&&(t.text=i(t.text));this.engine?.templates.clear()}_renameInFormulas(s,e){const i=te(s);let o=!1;for(const t of this.sheets){const n=new Map;t.formulas.forEachCell((l,c,a)=>{let h=n.get(a);if(h===void 0){const u=a.f??a.sf;if(u===void 0||!i.test(u))i.lastIndex=0,h=null;else{i.lastIndex=0;const p=$(u,s,e);h=a.f!==void 0?{...a,f:p,tpl:void 0}:{...a,sf:p,tpl:void 0}}n.set(a,h)}h!==null&&(t.setFormula(l,c,h),o=!0)})}let r=!1;for(const t of this.engine?.names.values()??[]){if(typeof t.text!="string")continue;const n=$(t.text,s,e);n!==t.text&&(t.text=n,r=!0)}r&&(this.namesChanged=!0,this.engine.nameTemplates.clear()),(o||r)&&(o&&(this.formulasEdited=!0),this.engine?.templates.clear(),this.engine?.rebuild())}editText(s,e,i){const o=s.kind(e,i);if(this.engine?.dataTables.length){const n=this.engine.dataTableAt(s,e,i);if(n){const{info:l}=n,c=l.dt2D==="1",a=l.dtr==="1";return`{=TABLE(${c||a?l.r1:""},${c?l.r2:a?"":l.r1})}`}}if(o&ye&&this.engine){const n=this.engine.spillMaster(s,e,i);if(n)return this.editText(s,n.row,n.col)}if(o&F){const n=s.formula(e,i),l=n&&!n.typed&&n.t!=="array"&&n.tpl?.rangeResult?"=@":"=";if(n&&n.f!==void 0){const c=l+he(n.f);return n.t==="array"&&!n.cm?`{${c}}`:c}if(n&&n.sf!==void 0){const c=Math.floor(n.base/R),a=n.base-c*R;return l+he(ve(n.sf,e-c,i-a))}}const r=o&X;if(r===O)return"";const t=s.value(e,i);if(r===L&&s.valueMeta!==null&&!(o&F)){const n=this.richImages?.get(s.valueMeta.get(e*R+i));if(n!==void 0)return n.alt??"";const l=this.richValues?.indexOfVm(s.valueMeta.get(e*R+i))??-1,c=l>=0?this.richValues.view(l):null;if(c!==null)return c.text}return r===E?this.styles.get(s.style(e,i)).quotePrefix?`'${this.strings.get(t)}`:this.strings.get(t):r===P?t?"TRUE":"FALSE":r===L?ge[t]??"#N/A":String(t)}transact(s,e,i=null){if(this.guard&&!this.guard(s))return;const o=this.selectedSheets;!i&&o?.size>1&&ze.has(s)&&(i=this.sheets.filter(t=>o.has(t)&&(!t.protection||t===this.sheet)));const r=i?this._runGroup(s,e,i):this._runOn(this.sheet,s,e);r!==null&&this._pushUndo(r)}transactOn(s,e,i){const o=this._runOn(s,e,i);o!==null&&this._pushUndo(o)}_runOn(s,e,i){const o=new D,r={sheet:s,log:o,saveCell:(d,m)=>o.push(s,d,m)},{maxRow:t,maxCol:n}=s,l=this.recorder?.length,c=this.formulasEdited;let a;try{a=i(r)??null}catch(d){throw d instanceof N&&(ce(s,o),s.maxRow=t,s.maxCol=n,this.formulasEdited=c,l!==void 0&&(this.recorder.length=l),this.engine?.cellsChanged(s,o.rows,o.cols,o.count)),d}e!=="entry"&&this.engine?.presentationChanged(),s.changes!==null&&o.count>0&&re(this,s,o),o.vms!==null&&$e(s,o);const h=o.count>0&&this.engine?.tables.size>0?me(this,r,o):null,u=(d,m)=>g=>u(d(g),m(g)),p=a&&h?u(a,h):a??h;return o.count===0&&p===null?null:(s.revision++,this.engine?.cellsChanged(s,o.rows,o.cols,o.count),{sheetIndex:s===this.sheet?this.activeSheet:this.sheets.indexOf(s),sheet:s,log:o,label:e,extra:p})}_runGroup(s,e,i){const o=[],r=this.activeSheet,t=this.recorder?.length,n=this.formulasEdited,l=[];try{for(const c of i){const{maxRow:a,maxCol:h}=c,u=this._runOn(c,s,e);u!==null&&(o.push(u),l.push([c,a,h]))}}catch(c){if(c instanceof N){this.rollbackSlices(o);for(const[a,h,u]of l)a.maxRow=h,a.maxCol=u;this.activeSheet=r,this.formulasEdited=n,t!==void 0&&(this.recorder.length=t)}throw c}return o.length===0?null:{sheetIndex:this.activeSheet,sheet:this.sheet,log:new D,label:s,extra:j(this,o)}}runSlice(s,e,i){const o=this._runOn(s,e,i);return o!==null&&this._emit("cells"),o}pushFolded(s,e,i){s.length!==0&&this._pushUndo({sheetIndex:this.sheets.indexOf(i),sheet:i,log:new D,label:e,extra:j(this,s)})}rollbackSlices(s){for(let e=s.length-1;e>=0;e--)this._restore(s[e]);this._emit("cells")}_pushUndo(s){this.allowUndo===!1?this.undoStack.length=0:(this.undoStack.push(s),this.undoStack.length>(this.historyLimit??Ie)&&this.undoStack.shift()),this.redoStack.length=0,this._emit("cells")}_restore(s){const e=s.sheet??this.sheets[s.sheetIndex],{log:i}=s,o=new D;if(ce(e,i,o),i.vms!==null){e.valueMeta=new Map(e.valueMeta??[]);for(const[n,l]of i.vms)e.valueMeta.set(i.rows[n]*R+i.cols[n],l)}let r=null;s.extra&&(r=s.extra(e)),this.engine?.presentationChanged(),e.changes!==null&&i.count>0&&re(this,e,o),e.revision++,this.engine?.cellsChanged(e,i.rows,i.cols,i.count);const t=this.sheets.indexOf(e);return t>=0&&(this.activeSheet=t),{sheetIndex:t>=0?t:s.sheetIndex,sheet:e,log:o,label:s.label,extra:r}}undo(){const s=this.undoStack.pop();return s?(this.redoStack.push(this._restore(s)),this._emit("cells"),!0):!1}redo(){const s=this.redoStack.pop();return s?(this.undoStack.push(this._restore(s)),this._emit("cells"),!0):!1}setInput(s,e,i,o,{overLimitAsText:r=!1,typedQuote:t=!0}={}){const{sheet:n}=s,l=n.style(e,i),c=o!==""&&this.styles.get(l).numFmt==="@";let a=c?{kind:E,text:o[0]==="'"?o.slice(1):o}:oe(o,void 0,this.dateOffset);if(a.kind===F){const u=Te(a.formula);if(u){if(!r)throw new N(u);a={kind:E,text:o}}}if(this.recorder){const u=a.kind===E&&o.startsWith("=")&&!c?`'${o}`:o;this.recorder.push(`sheet.setValue(${JSON.stringify(Se(e,i))}, ${JSON.stringify(u)});`)}s.saveCell(e,i),n.setFormula(e,i,null);const h=t&&o[0]==="'"&&o.length>1;switch((h||this.styles.get(l).quotePrefix)&&n.setStyle(e,i,this.styles.derive(l,{quotePrefix:h})),a.kind){case O:n.setCell(e,i,O,0);break;case B:n.setCell(e,i,B,a.value),a.format&&this.styles.get(l).numFmt==="General"&&n.setStyle(e,i,this.styles.derive(n.style(e,i),{numFmt:a.format}));break;case P:n.setCell(e,i,P,a.value);break;case L:n.setCell(e,i,L,a.value);break;case F:n.setCell(e,i,F|O,0),n.setFormula(e,i,{f:Oe(this._expandTableRefs(de(a.formula,this.engine?.tables),n,e,i),this.engine?.names??null),typed:this.dynamicArrays!==!1}),this.formulasEdited=!0;break;default:n.setCell(e,i,E,this.strings.add(ie(a.text)))}}setRichInput(s,e,i,o,r){const{sheet:t}=s;s.saveCell(e,i),t.setFormula(e,i,null);const n=ie(o);t.setCell(e,i,E,this.strings.addRich(n,n===o?r:r?.filter(l=>l.at<n.length)))}_expandTableRefs(s,e,i,o){const r=this.engine;return!r||r.tables.size===0?s:Ee(s,()=>{for(const t of r.tables.values())if(t.sheet===e&&i>=t.r0&&i<=t.r1&&o>=t.c0&&o<=t.c1)return t;return null})}clearRange(s,e="contents",{visibleOnly:i=!1}={}){this.sheet.dataRanges?.cleared(s)||this.transact("clear",o=>{const{sheet:r}=o,t=[];if(e!=="contents")for(const{r0:l,c0:c,r1:a,c1:h}of s){const u=l===0&&a===Q-1,p=c===0&&h===R-1,d=(m,g,y,w)=>{for(const[C,x]of[...g])C<y||C>w||(t.push([m,C,x]),g.delete(C))};u&&r.colStyles!==null&&d("col",r.colStyles,c,h),p&&r.rowStyles!==null&&d("row",r.rowStyles,l,a)}const n=i&&r.filteredRows?.size>0?r.filteredRows:null;for(const{r0:l,c0:c,r1:a,c1:h}of s){const u=Math.min(h,r.maxCol),p=Math.min(a,r.maxRow);for(let d=c;d<=u;d++)if(r.columns[d]!==void 0)for(let m=l;m<=p;m++){if(r._chunk(m,d)===void 0){m|=1023;continue}if(n!==null&&n.has(m))continue;const y=r.kind(m,d)!==0,w=r.cellStyle(m,d)!==0;if(e==="formats"){if(!w)continue;o.saveCell(m,d),r.setStyle(m,d,0);continue}!y&&!(e==="all"&&w)||(o.saveCell(m,d),r.setCell(m,d,O,0),r.setFormula(m,d,null),e==="all"&&r.setStyle(m,d,0))}}return t.length>0?q([],t):void 0})}applyStyle(s,e,{measureRow:i,numberFit:o}={}){const r=JSON.stringify(e);if(this.recorder)for(const t of s)this.recorder.push(`sheet.setFormat(${JSON.stringify(Ce(t))}, ${r});`);this.transact("format",t=>{const{sheet:n}=t;this.strings.rich!==null&&Me(this,t,s,e);const l=[],c=new Set,a=[],h=[],u=(g,y,w)=>{const C=g*2048+y;c.has(C)||(c.add(C),l.push(g,y,w.styles===null?null:w.styles.slice()))},p=(g,y,w)=>{w===0&&(n.rowStyles?.has(g)||n.colStyles?.has(y))&&(w=this.styles.explicitDefault()),n.setStyle(g,y,w)};for(const{r0:g,c0:y,r1:w,c1:C}of s){const x=g===0&&w===Q-1,v=y===0&&C===R-1,k=x||v,b=k?Math.min(w,n.maxRow):w,ue=k?Math.min(C,n.maxCol):C;for(let S=y;S<=ue&&g<=b;S++){const _=n.columns[S];if(!(k&&!_))for(let M=g>>>U;M<=b>>>U;M++){const J=M<<U,K=Math.max(g,J),fe=Math.min(b,J+W),H=k?_[M]:n._ensure(K,S);if(!(k&&!H?.styles)){u(S,M,H);for(let A=K;A<=fe;A++)(!k||H.styles[A&W])&&p(A,S,this.styles.derive(n.style(A,S),e,r))}}}const z=S=>this.styles.derive(S,e,r),G=(S,_,M)=>{u(_,S>>>U,n._ensure(S,_)),n.setStyle(S,_,M||this.styles.explicitDefault())};if(v&&x){xe(n,z,a);for(const[S,_]of n.rowStyles??[])a.push(["row",S,_]),n.rowStyles.set(S,z(_))}else if(x)for(let S=y;S<=C;S++)ne(n,"col",S,z,a,G);else if(v)for(let S=g;S<=w;S++)ne(n,"row",S,z,a,G)}const d=(g,y,w)=>{const C=n[g];w!==C.sizeOf(y)&&(h.push([g,y,C.isCustom(y)?C.sizeOf(y):null,C.isAuto(y)]),C.setSize(y,w,!0),g==="cols"&&(n.colsChanged=!0))},m=e.fontSize!==void 0||e.wrap!==void 0||e.rotation!==void 0||["justify","distributed"].includes(e.hAlign)||["justify","distributed"].includes(e.vAlign);for(const{r0:g,r1:y,c0:w,c1:C}of s){const x=Math.min(y,n.maxRow);if(m&&x-g<=2e3)for(let v=g;v<=x;v++)d("rows",v,_e(n,this,v,i));if(o)for(const v of o.cols){if(v<w||v>C||!n.columns[v]||n.cols.isCustom(v)&&!n.cols.isAuto(v))continue;let k=n.cols.sizeOf(v);for(const b of o.rows)b>=g&&b<=x&&(n.kind(b,v)&X)===B&&(k=Math.max(k,o.measure(n,b,v)));d("cols",v,k)}}return q(l,a,h)})}}function ce(f,s,e){for(let i=s.count-1;i>=0;i--){const o=s.rows[i],r=s.cols[i];e?.push(f,o,r),f.setCell(o,r,s.kinds[i],s.values[i]),f.setStyle(o,r,s.styles[i]),f.setFormula(o,r,s.kinds[i]&F?s.formulas.get(i):null)}}function j(f,s){const e=()=>{const i=[];for(let o=s.length-1;o>=0;o--)i.push(f._restore(s[o]));return j(f,i)};return e.parts=s,e}function $e(f,s){let e=null;for(const i of s.vms.keys()){const o=s.rows[i],r=s.cols[i];(f.kind(o,r)&~(Z|Y))===s.kinds[i]&&f.value(o,r)===s.values[i]||(e??=new Map(f.valueMeta),e.delete(o*R+r))}e!==null&&(f.valueMeta=e.size>0?e:null)}function Ne(f,s,e,i){if(!s.size||typeof f!="string")return f;let o;try{o=Ae(f)}catch(n){if(n instanceof N)return f;throw n}let r="",t=0;for(let n=0;n<o.length;n++){const l=o[n],c=l.t==="name"?f.slice(l.s,l.e):l.t==="table"?l.v.name:null;if(!c)continue;const a=s.get(c.toUpperCase());if(!a)continue;let h=n-1;for(;o[h]?.t==="ws";)h--;const u=o[h];if(u?.t==="sheet"){const{book:p,sheet:d,sheet2:m}=u.v;if(p!==null||m!==null)continue;if(d.toUpperCase()===e.toUpperCase())r+=f.slice(t,u.s)+ee(i)+"!",t=u.e;else if(d.toUpperCase()!==i.toUpperCase())continue}r+=f.slice(t,l.s)+a.name,t=l.s+c.length}return t?r+f.slice(t):f}function T(f){if(f===null||typeof f!="object")return f;if(Array.isArray(f))return f.map(T);if(f instanceof Map)return new Map([...f].map(([e,i])=>[e,T(i)]));if(f instanceof Set)return new Set([...f].map(T));if(ArrayBuffer.isView(f))return f.slice();const s={};for(const[e,i]of Object.entries(f))!e.startsWith("_")&&typeof i!="function"&&(s[e]=T(i));return s}function q(f,s,e=[]){return i=>{const o=[];for(let n=0;n<f.length;n+=3){const l=f[n],c=f[n+1],a=i.columns[l]?.[c];a!==void 0&&(o.push(l,c,a.styles),a.styles=f[n+2])}const r=[];for(let n=s.length-1;n>=0;n--){const[l,c,a]=s[n];if(l==="columns"){r.push([l,c,i.colStyles]),i.colStyles=a,i.colsChanged=!0;continue}l==="col"&&(i.colsChanged=!0);const h=l==="col"?"colStyles":"rowStyles",u=i[h]??=new Map;r.push([l,c,u.get(c)]),a===void 0?u.delete(c):u.set(c,a)}const t=[];for(let n=e.length-1;n>=0;n--){const[l,c,a,h]=e[n],u=i[l];t.push([l,c,u.isCustom(c)?u.sizeOf(c):null,u.isAuto(c)]),u.setSize(c,a,h),l==="cols"&&(i.colsChanged=!0)}return q(o,r,t)}}export{D as CellLog,ze as GROUP_LABELS,nt as Workbook,j as foldEntries,oe as parseInput,Le as renameInRules,q as swapStyles};
|
package/datasheets/manager.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./query-function.js";import{Sheet as u}from"../core/sheet.js";import{DataManager as l}from"./data.js";import{TableView as o}from"./view.js";import{TableSheet as
|
|
1
|
+
import"./query-function.js";import{Sheet as u}from"../core/sheet.js";import{DataManager as l}from"./data.js";import{TableView as o}from"./view.js";import{TableSheet as c}from"./table-sheet.js";import{createPlanTable as m,GanttSheet as f}from"./gantt.js";import{ReportTemplate as g}from"./report.js";import{TableBinding as p}from"./bind.js";import{CellPathBinding as S,RowsBinding as b}from"./path-binding.js";import{attachDataEntry as w}from"./report-entry.js";import{buildDataSheetPackage as _,dataSheetsFromJSON as v,dataSheetsToJSON as T,readDataSheetPackage as k,rowBatches as B}from"./persist.js";class O{constructor(e){this.book=e,this.manager=new l(e),e.dataSheets=this,this.sheets=[],this.bindings=[],this.reports=[],this.loaded=!1,this.onSheetAdded=null,this.savedSheets=null,this.loadNotes=[],this._hookInput(e)}_hookInput(e){if(e.setInputRouted)return;e.setInputRouted=!0;const t=e.setInput;e.setInput=function(r,i,n,a,d){const{sheet:h}=r;if(!(h.routeInput!==void 0&&h.routeInput(r,i,n,a)))return t.call(this,r,i,n,a,d)}}_uniqueName(e){const t=r=>this.book.sheets.some(i=>i.name.toLowerCase()===r.toLowerCase());let s=e;for(let r=2;t(s);r++)s=`${e}${r}`;return s}_insert(e,t=!0,s=null){const{book:r}=this;r.sheets.push(e),t&&(r.activeSheet=r.sheets.length-1),r.structureEdited=!0,r.engine?.sheetsChanged(),s?.(),r._emit("sheets")}_registerSheet(e){this.sheets.push(e),this.onSheetAdded?.(e)}_registerBinding(e){this.bindings.push(e),this.onSheetAdded?.(e.sheet)}isDataSheet(e){return e.isVirtual===!0}addTableFromSheetTable(e,t=null){const s=e,r=this.manager.addTable(t??`${s.name} Data`);return r.loadSheet(this.book,s.sheet,{r0:s.r0,c0:s.c0,r1:s.r1-s.totalsRows,c1:s.c1}),r}addTable(e,t){return this.manager.addTable(e,t)}addTableSheet(e,t,s={},r={}){const i=this.manager.table(t),n=s instanceof o?s:new o(i,s),a=new c(this.book,this._uniqueName(e),n,r);return this._insert(a,r.activate!==!1,()=>this._registerSheet(a)),a}addGanttSheet(e,t=null,s={}){const r=Array.isArray(t)?t:[],i=t&&!Array.isArray(t)?this.manager.table(t):m(this.manager,this._freeTable(`${e} Tasks`),r),n=new f(this.book,this._uniqueName(e),i,s);return this._insert(n,s.activate!==!1,()=>this._registerSheet(n)),n}_freeTable(e){let t=e;for(let s=2;this.manager.tables.has(t);s++)t=`${e} ${s}`;return t}addReportSheet(e,t={}){const s=new u(this._uniqueName(e));let r=null;return this._insert(s,t.activate!==!1,()=>{r=new g(this.manager,s,t),this.reports.push(r),this.onSheetAdded?.(s)}),r}bindPaths(e,t=null,s={}){const r=new S(this.book,e,t,s);return this._registerBinding(r),r}bindRows(e,t,s,r={}){const i=new b(this.book,e,t,s,r);return this._registerBinding(i),i}dataEntry(e){if(!e.output)throw new Error("Generate the report first.");return w(this.book,e,e.output)}toJSON(e){return T(this,e)}rowBatches(e){return B(this.manager.table(e))}fromJSON(e){return v(e,this),this}bindTable(e,t,s,r={}){const i=new p(this.book,e,t,s,r);return this._registerBinding(i),i}removeBinding(e){e.unbind(),this.bindings=this.bindings.filter(t=>t!==e)}_pruneDeleted(){const e=new Set(this.book.sheets);this.sheets=this.sheets.filter(t=>e.has(t)),this.bindings=this.bindings.filter(t=>e.has(t.sheet)),this.reports=this.reports.filter(t=>e.has(t.sheet))}prepareSave(){this._pruneDeleted();for(const e of this.sheets)e.prepareSave();this.savedSheets=this.sheets.slice()}async savePackage(){for(const t of this.sheets)t.savePlanned?.();const e=await _(this);return e.parts.length===0&&!this.loaded?null:e}finishSave(){for(const e of this.savedSheets??[])e.finishSave();this.savedSheets=null}async load(e){return k(e,this)}}export{O as DataSheets};
|
package/datasheets/persist.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{decodeBytes as Y}from"../core/strings.js";import{MANIFEST_NAME as L,NS as q,partFileName as K}from"./persist-writer.js";import{ROW as J}from"./data.js";import{TableView as Q}from"./view.js";import{TableSheet as Z}from"./table-sheet.js";import{GanttSheet as z,WorkCalendar as j}from"./gantt.js";import{ReportTemplate as ee}from"./report.js";import{TableBinding as te}from"./bind.js";import{CellPathBinding as ne,RowsBinding as oe}from"./path-binding.js";import{t as se}from"../i18n/index.js";const M=2,U=new TextEncoder,O=1<<18,A=()=>new Promise(e=>setTimeout(e,0)),$=e=>e!==null&&!e.lookup&&!e.rollup&&!e.window&&!e.name.startsWith("__formula:")&&!e.name.startsWith("__cross:");function F(e){const i={name:e.name,type:e.type};return e.caption!==e.name&&(i.caption=e.caption),e.format!=="General"&&!(e.type==="date"&&e.format==="yyyy-mm-dd")&&(i.format=e.format),e.readOnly&&(i.readOnly=!0),e.width!==null&&(i.width=e.width),e.hidden&&(i.hidden=!0),e.formula!==null&&(i.formula=e.formula),e.defaultValue!==null&&(i.defaultValue=e.defaultValue),e.required&&(i.required=!0),e.showNullAs!==null&&(i.showNullAs=e.showNullAs),e.validator!==null&&!e.validator.fn&&(i.validator=e.validator),e.trigger&&(i.trigger=e.trigger),i}function ie(e){const i=e.rowCount,{state:t,alive:r}=e;let o=!1;for(let l=0;l<i;l++)if(t[l]===J.PURGED&&r[l]===0){o=!0;break}if(!o)return null;const a=new Int32Array(i);let n=0;for(let l=0;l<i;l++)a[l]=t[l]===J.PURGED&&r[l]===0?-1:n++;return{map:a,count:n}}function C(e,i,t){if(t===null)return e.subarray(0,i);const r=new e.constructor(t.count);for(let o=0;o<i;o++)t.map[o]>=0&&(r[t.map[o]]=e[o]);return r}async function ae(e,i,t){const r=e.rowCount,o=ie(e),a=o?o.count:r,{strings:n}=e.manager,l=`t${i}/`,s=(d,h)=>(t.push({name:`${l}${d}`,blob:new Blob([h]),bytes:h.byteLength}),d),c=new Map,f=[],u=d=>{let h=c.get(d);return h===void 0&&(h=f.length,c.set(d,h),f.push(n.get(d))),h},m=[],g=[];let p=0;for(const d of e.columns){if(!$(d)||(m.push(F(d)),d.computed))continue;const h={field:d.name};if(d.isString){const b=C(d.data,r,o),y=new Int32Array(b.length);for(let w=0;w<b.length;w++){const D=b[w];y[w]=D<0?-1:u(D),++p%O===0&&await A()}h.encoding="i32",h.part=s(`c${d.index}.bin`,y)}else if(d.kinds!==null){const b=C(d.kinds,r,o),y=Float64Array.from(C(d.data,r,o));for(let w=0;w<y.length;w++)b[w]===2&&(y[w]=u(y[w])),++p%O===0&&await A();h.encoding="mixed",h.part=s(`c${d.index}.bin`,y),h.kinds=s(`c${d.index}.kinds`,b)}else h.encoding="f64",h.part=s(`c${d.index}.bin`,C(d.data,r,o));d.styles!==null&&(h.styles=s(`c${d.index}.styles`,C(d.styles,r,o))),g.push(h)}const S=[],k=new Float64Array(f.length+1);let x=0,v=[],N=0;const R=()=>{N!==0&&(S.push(U.encode(v.join(""))),v=[],N=0)};for(let d=0;d<f.length;d++){const h=re(f[d]);k[d]=x,x+=h,v.push(f[d]),N+=f[d].length,N>1<<20&&(R(),await A())}R(),k[f.length]=x,t.push({name:`${l}strings.bin`,blob:new Blob(S),bytes:x}),s("strings.idx",k);const G=C(e.alive,r,o),I=C(e.state,r,o);s("alive.bin",G),s("state.bin",I);const B=[];for(const[d,h]of e.originals){const b=o?o.map[d]:d;b<0||B.push([b,[...h].map(([y,w])=>[e.columns[y].name,_(w)])])}return{name:e.name,key:e.key,tracking:e.tracking,rowCount:a,dir:l,indexes:e.getIndexes(),windows:e.windowDefs,schema:e.schema,remote:E(e.remote),autoSync:e.autoSync,batch:e.batchSync,stringCount:f.length,fields:m,columns:g,originals:B,map:o}}function E(e){if(!e||typeof e!="object")return null;const i={};for(const[t,r]of Object.entries(e))typeof r!="function"&&(i[t]=r);return Object.keys(i).length>0?i:null}const _=e=>e!==null&&typeof e=="object"?{error:e.code}:e;function re(e){let i=e.length;for(let t=0;t<e.length;t++){const r=e.charCodeAt(t);if(r>=128)if(r<2048)i++;else if(r>=55296&&r<=56319){const o=e.charCodeAt(t+1);o>=56320&&o<=57343?(i+=2,t++):i+=2}else i+=2}return i}function T(e,i){const t=e.toJSON(),r=i.map;return r&&(t.pinnedRows=t.pinnedRows.map(o=>r.map[o]).filter(o=>o>=0),t.treeCollapsed=t.treeCollapsed.map(o=>r.map[o]).filter(o=>o>=0)),t}function le(e){return e.toJSON()}function W(e,i){let t=0;const r=new Map,{columns:o}=e;for(let a=0;a<o.length;a++){const n=o[a];if(n===void 0)continue;const l=n.length;for(let s=0;s<l;s++){const c=n[s];if(c===void 0)continue;const{kinds:f,values:u}=c;for(let m=0;m<f.length;m++){const g=f[m]&7;if(g===0)continue;let p;if(g===2){const k=u[m];if(p=r.get(k),p===void 0){p=7;const x=i.get(k);for(let v=0;v<x.length;v++)p=Math.imul(p,31)+x.charCodeAt(v)|0;r.set(k,p)}}else p=Math.round(u[m]*1e3)|0;const S=Math.imul((s<<10)+m+1,2654435761)^Math.imul(a+1,2246822507);t=t+Math.imul(p^S,625341585)|0}}}return t}function ce(e,i,t){return{sheet:e.name,kind:e.kindName,table:e.table.name,view:T(e.view,i(e.table)),options:e.options,gantt:e.kindName==="gantt"?e.toJSON():void 0,cells:W(e,t)}}function V(e,i){const{manager:t,sheets:r,bindings:o,reports:a,book:n}=e,l=s=>i.find(c=>c.name===s.name);return{format:"8sheets-datasheets",version:M,tables:i.map(({map:s,...c})=>c),relationships:t.relationships.map(s=>({from:s.from.name,fromField:s.fromField,to:s.to.name,toField:s.toField,name:s.name,inverse:s.inverse})),views:[...t.tables.values()].flatMap(s=>[...s.views.values()].map(c=>({table:s.name,name:c.name,view:T(c,l(s))}))),sheets:r.map(s=>ce(s,l,n.strings)),bindings:o.map(s=>s.toJSON?s.toJSON():{kind:"view",sheet:s.sheet.name,range:s.range,table:s.table.name,view:T(s.view,l(s.table)),options:{header:s.options.header,grow:s.options.grow,editable:s.options.editable,sticky:s.options.sticky}}),reports:a.map(le)}}async function Se(e){const{manager:i,sheets:t,bindings:r,reports:o}=e,a=e.sourceParts??[];if(!(i.tables.size>0||t.length>0||o.length>0||r.length>0))return{parts:[],replaced:a};const l=[],s=[];let c=0;for(const u of i.tables.values())s.push(await ae(u,c++,l));const f=U.encode(JSON.stringify(V(e,s)));return l.push({name:L,blob:new Blob([f]),bytes:f.length}),l.forEach((u,m)=>{u.file=K(m)}),{parts:l,replaced:a}}const fe=(()=>{const e=new Int8Array(256).fill(-1),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(let t=0;t<64;t++)e[i.charCodeAt(t)]=t;return e})();async function ue(e,i){const t=(await e.stream(i)).getReader(),{value:r}=await t.read();if(t.cancel().catch(()=>{}),!r)return null;const o=new TextDecoder().decode(r.subarray(0,400));if(!o.includes(q))return null;const a=/\bn="([^"]*)"/.exec(o)?.[1],n=Number(/\bb="(\d+)"/.exec(o)?.[1]??0);return a===void 0?null:{name:a,bytes:n,file:i}}async function H(e,i,t){const r=(await e.stream(i)).getReader(),o=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);let a=0,n=!1,l=0,s=0;for(;;){const{done:c,value:f}=await r.read();if(c)break;let u=0;if(!n){let m=0;for(;u<f.length;u++)if(f[u]===62&&(m++,m===2)){u++,n=!0;break}if(!n)continue}for(;u<f.length;u++){const m=fe[f[u]];m<0||(l=l<<6|m,s++,s===4&&(a+3<=o.length?(o[a]=l>>16,o[a+1]=l>>8&255,o[a+2]=l&255):(a<o.length&&(o[a]=l>>16),a+1<o.length&&(o[a+1]=l>>8&255)),a+=3,l=0,s=0))}}s===2&&a<o.length&&(o[a]=l>>4),s===3&&(a<o.length&&(o[a]=l>>10),a+1<o.length&&(o[a+1]=l>>2&255))}async function de(e,i,t){const r=i.addTable(t.name,{key:t.key,tracking:t.tracking,capacity:t.rowCount,fields:t.fields,windows:t.windows,schema:t.schema,remote:t.remote,autoSync:t.autoSync,batch:t.batch,indexes:t.indexes}),{dir:o}=t,a=new Float64Array(t.stringCount+1);await e(`${o}strings.idx`,a);const n=new Uint8Array(a[t.stringCount]);await e(`${o}strings.bin`,n);const l=new Int32Array(t.stringCount);for(let c=0;c<t.stringCount;c++)l[c]=i.strings.add(Y(n,a[c],a[c+1])),(c+1)%O===0&&await A();r.rowCount=t.rowCount;for(const c of t.columns){const f=r.byName.get(c.field);if(f){if(c.encoding==="i32"){const u=new Int32Array(t.rowCount);await e(`${o}${c.part}`,u);const{data:m}=f;for(let g=0;g<t.rowCount;g++){const p=u[g];m[g]=p<0?-1:l[p]}}else if(c.encoding==="mixed"){await e(`${o}${c.part}`,new Float64Array(f.data.buffer,0,t.rowCount)),f.kinds=new Uint8Array(r.capacity),await e(`${o}${c.kinds}`,new Uint8Array(f.kinds.buffer,0,t.rowCount));for(let u=0;u<t.rowCount;u++)f.kinds[u]===2&&(f.data[u]=l[f.data[u]])}else await e(`${o}${c.part}`,new Float64Array(f.data.buffer,0,t.rowCount));c.styles&&(f.styles=new Uint16Array(r.capacity),await e(`${o}${c.styles}`,new Uint16Array(f.styles.buffer,0,t.rowCount))),await A()}}await e(`${o}alive.bin`,new Uint8Array(r.alive.buffer,0,t.rowCount)),await e(`${o}state.bin`,new Uint8Array(r.state.buffer,0,t.rowCount));let s=0;for(let c=0;c<t.rowCount;c++)r.alive[c]===0&&s++;r.deletedCount=s;for(const[c,f]of t.originals)r.originals.set(c,new Map(f.map(([u,m])=>[r.byName.get(u)?.index,m]).filter(([u])=>u!==void 0)));return r.revision++,r.structureRevision++,r._markAllComputedStale(),r}function P(e,i){const t=new Q(e,i);return t.applySavedState(i),t}async function Ne(e,i){const t=new Map,r=[];for(const c of e.entries.keys()){if(!c.startsWith("customXml/")||c.includes("/_rels/")||!c.endsWith(".xml")||/itemProps/i.test(c))continue;const f=await ue(e,c);f&&(t.set(f.name,f),r.push(c))}const o=t.get(L);if(!o)return!1;const a=new Uint8Array(o.bytes);await H(e,o.file,a);const n=JSON.parse(new TextDecoder().decode(a));if(n.format!=="8sheets-datasheets"||n.version>M)return!1;i.sourceParts=me(e,r);const l=async(c,f)=>{const u=t.get(c);u&&await H(e,u.file,f)},{manager:s}=i;for(const c of n.tables)await de(l,s,c);return X(n,i),i.loaded=!0,!0}function me(e,i){const t=[];for(const r of i){t.push(r);const o=r.slice(10),a=`customXml/_rels/${o}.rels`;if(e.has(a)){t.push(a);const n=/(\d+)\.xml$/.exec(o)?.[1];n&&e.has(`customXml/itemProps${n}.xml`)&&t.push(`customXml/itemProps${n}.xml`)}}return t}function he(e,i,t){return{view:i,fields:e.fields,calendar:new j(e.calendar),calendars:e.calendars,durationUnit:e.durationUnit,scaleLevel:e.scaleLevel,scale:e.scale,showCritical:e.showCritical,showBaseline:e.showBaseline,showLinks:e.showLinks,showLabels:e.showLabels,showToday:e.showToday,statusDate:e.statusDate,taskbarRules:e.taskbarRules,taskbarStyles:e.taskbarStyles,layout:e.layout,gridlines:e.gridlines,nonWorking:e.nonWorking,progressLine:e.progressLine,frozenLimit:e.frozenLimit,sheet:t}}function X(e,i){const{book:t,manager:r}=i;for(const n of e.relationships)r.addRelationship(n);for(const n of e.views??[]){const l=r.table(n.table);l.views.set(n.name,P(l,n.view))}const o=n=>t.sheets.find(l=>l.name===n),a=[];for(const n of e.sheets){const l=o(n.sheet);if(!l)continue;if(n.cells!==void 0&&!l.isVirtual&&W(l,t.strings)!==n.cells){a.push(n.sheet);continue}const s=r.table(n.table),c=P(s,n.view);let f;n.kind==="gantt"?(f=new z(t,n.sheet,s,he(n.gantt,c,n.options)),n.gantt.resourceTable&&(f.resourceTable=r.tables.get(n.gantt.resourceTable)??null,f.assignmentTable=r.tables.get(n.gantt.assignmentTable)??null,f.resourceNamesChanged())):f=new Z(t,n.sheet,c,n.options),f.adoptFrom(l),t.sheets[t.sheets.indexOf(l)]=f,i._registerSheet(f)}a.length>0&&i.loadNotes.push(se("{sheets} changed outside this app, so they stay plain sheets. The data tables are still there.",{sheets:a.join(", "),count:a.length}));for(const n of e.bindings){const l=o(n.sheet);if(l)if(n.kind==="paths"){const s=new ne(t,l,n.source?.table?n.source:n.source?.data??null);s.paths=new Map(n.paths),s.fieldOptions=new Map(n.fieldOptions??[]),s.refresh(),i._registerBinding(s)}else if(n.kind==="rows")i._registerBinding(new oe(t,l,n.anchor,n.data,{columns:n.columns,...n.options,table:n.table?t.engine?.tables.get(n.table.toUpperCase())??null:null}));else{const s=P(r.table(n.table),n.view);i._registerBinding(new te(t,l,n.range,s,n.options))}}for(const n of e.reports){const l=o(n.sheet);if(!l)continue;const s=new ee(r,l,{table:n.table,name:n.name,titleRows:n.titleRows,pageSetup:n.pageSetup,mode:n.mode,pagination:n.pagination,layout:n.layout,dataEntry:n.dataEntry,charts:n.charts,pictures:n.pictures,states:n.states,showHiddenRows:n.showHiddenRows,showHiddenCols:n.showHiddenCols});for(const c of n.bindings)s.setBinding(c.row,c.col,c);for(const c of n.params)s.addParam(c.name,c);s.filters=n.filters,s.output=n.output?o(n.output)??null:null,i.reports.push(s)}t.engine?.sheetsChanged(),t.engine?.rebuild()}function Oe(e){const{manager:i,book:t}=e,r=[...i.tables.values()].map(a=>{const n=[],l=a.columns.filter(s=>$(s)&&!s.computed);for(let s=0;s<a.rowCount;s++){if(a.alive[s]===0)continue;const c={};for(const f of l){const u=f.get(s);u!==null&&(c[f.name]=_(u))}n.push(c)}return{name:a.name,key:a.key,tracking:a.tracking,windows:a.windowDefs,schema:a.schema,remote:E(a.remote),autoSync:a.autoSync,batch:a.batchSync,indexes:a.getIndexes(),fields:a.columns.filter($).map(F),rows:n}}),o=V(e,r.map(a=>({name:a.name,map:null})));o.tables=r;for(const a of o.sheets)delete a.cells;return o}function $e(e,i){const{book:t,manager:r}=i;for(const o of e.tables){const{rows:a,...n}=o;r.addTable(o.name,n).load(a)}for(const o of e.sheets)t.sheets.some(a=>a.name===o.sheet)||t.addSheet(o.sheet);for(const o of e.reports??[])t.sheets.some(a=>a.name===o.sheet)||t.addSheet(o.sheet);X(e,i)}export{Se as buildDataSheetPackage,$e as dataSheetsFromJSON,Oe as dataSheetsToJSON,he as ganttOptions,W as hashSheetCells,Ne as readDataSheetPackage};
|
|
1
|
+
import{decodeBytes as Y}from"../core/strings.js";import{MANIFEST_NAME as L,NS as q,partFileName as K}from"./persist-writer.js";import{ROW as J}from"./data.js";import{TableView as Q}from"./view.js";import{TableSheet as Z}from"./table-sheet.js";import{GanttSheet as z,WorkCalendar as j}from"./gantt.js";import{ReportTemplate as ee}from"./report.js";import{TableBinding as te}from"./bind.js";import{CellPathBinding as ne,RowsBinding as oe}from"./path-binding.js";import{t as se}from"../i18n/index.js";const M=2,U=new TextEncoder,N=1<<18,A=()=>new Promise(e=>setTimeout(e,0)),$=e=>e!==null&&!e.lookup&&!e.rollup&&!e.window&&!e.name.startsWith("__formula:")&&!e.name.startsWith("__cross:");function F(e){const s={name:e.name,type:e.type};return e.caption!==e.name&&(s.caption=e.caption),e.format!=="General"&&!(e.type==="date"&&e.format==="yyyy-mm-dd")&&(s.format=e.format),e.readOnly&&(s.readOnly=!0),e.width!==null&&(s.width=e.width),e.hidden&&(s.hidden=!0),e.formula!==null&&(s.formula=e.formula),e.defaultValue!==null&&(s.defaultValue=e.defaultValue),e.required&&(s.required=!0),e.showNullAs!==null&&(s.showNullAs=e.showNullAs),e.validator!==null&&!e.validator.fn&&(s.validator=e.validator),e.trigger&&(s.trigger=e.trigger),s}function ie(e){const s=e.rowCount,{state:t,alive:i}=e;let o=!1;for(let r=0;r<s;r++)if(t[r]===J.PURGED&&i[r]===0){o=!0;break}if(!o)return null;const l=new Int32Array(s);let n=0;for(let r=0;r<s;r++)l[r]=t[r]===J.PURGED&&i[r]===0?-1:n++;return{map:l,count:n}}function C(e,s,t){if(t===null)return e.subarray(0,s);const i=new e.constructor(t.count);for(let o=0;o<s;o++)t.map[o]>=0&&(i[t.map[o]]=e[o]);return i}async function ae(e,s,t){const i=e.rowCount,o=ie(e),l=o?o.count:i,{strings:n}=e.manager,r=`t${s}/`,a=(u,h)=>(t.push({name:`${r}${u}`,blob:new Blob([h]),bytes:h.byteLength}),u),c=new Map,f=[],d=u=>{let h=c.get(u);return h===void 0&&(h=f.length,c.set(u,h),f.push(n.get(u))),h},m=[],g=[];let p=0;for(const u of e.columns){if(!$(u)||(m.push(F(u)),u.computed))continue;const h={field:u.name};if(u.isString){const b=C(u.data,i,o),y=new Int32Array(b.length);for(let w=0;w<b.length;w++){const D=b[w];y[w]=D<0?-1:d(D),++p%N===0&&await A()}h.encoding="i32",h.part=a(`c${u.index}.bin`,y)}else if(u.kinds!==null){const b=C(u.kinds,i,o),y=Float64Array.from(C(u.data,i,o));for(let w=0;w<y.length;w++)b[w]===2&&(y[w]=d(y[w])),++p%N===0&&await A();h.encoding="mixed",h.part=a(`c${u.index}.bin`,y),h.kinds=a(`c${u.index}.kinds`,b)}else h.encoding="f64",h.part=a(`c${u.index}.bin`,C(u.data,i,o));u.styles!==null&&(h.styles=a(`c${u.index}.styles`,C(u.styles,i,o))),g.push(h)}const O=[],k=new Float64Array(f.length+1);let x=0,v=[],S=0;const R=()=>{S!==0&&(O.push(U.encode(v.join(""))),v=[],S=0)};for(let u=0;u<f.length;u++){const h=re(f[u]);k[u]=x,x+=h,v.push(f[u]),S+=f[u].length,S>1<<20&&(R(),await A())}R(),k[f.length]=x,t.push({name:`${r}strings.bin`,blob:new Blob(O),bytes:x}),a("strings.idx",k);const G=C(e.alive,i,o),I=C(e.state,i,o);a("alive.bin",G),a("state.bin",I);const B=[];for(const[u,h]of e.originals){const b=o?o.map[u]:u;b<0||B.push([b,[...h].map(([y,w])=>[e.columns[y].name,E(w)])])}return{name:e.name,key:e.key,tracking:e.tracking,rowCount:l,dir:r,indexes:e.getIndexes(),windows:e.windowDefs,schema:e.schema,remote:_(e.remote),autoSync:e.autoSync,batch:e.batchSync,stringCount:f.length,fields:m,columns:g,originals:B,map:o}}function _(e){if(!e||typeof e!="object")return null;const s={};for(const[t,i]of Object.entries(e))typeof i!="function"&&(s[t]=i);return Object.keys(s).length>0?s:null}const E=e=>e!==null&&typeof e=="object"?{error:e.code}:e;function re(e){let s=e.length;for(let t=0;t<e.length;t++){const i=e.charCodeAt(t);if(i>=128)if(i<2048)s++;else if(i>=55296&&i<=56319){const o=e.charCodeAt(t+1);o>=56320&&o<=57343?(s+=2,t++):s+=2}else s+=2}return s}function T(e,s){const t=e.toJSON(),i=s.map;return i&&(t.pinnedRows=t.pinnedRows.map(o=>i.map[o]).filter(o=>o>=0),t.treeCollapsed=t.treeCollapsed.map(o=>i.map[o]).filter(o=>o>=0)),t}function le(e){return e.toJSON()}function W(e,s){let t=0;const i=new Map,{columns:o}=e;for(let l=0;l<o.length;l++){const n=o[l];if(n===void 0)continue;const r=n.length;for(let a=0;a<r;a++){const c=n[a];if(c===void 0)continue;const{kinds:f,values:d}=c;for(let m=0;m<f.length;m++){const g=f[m]&7;if(g===0)continue;let p;if(g===2){const k=d[m];if(p=i.get(k),p===void 0){p=7;const x=s.get(k);for(let v=0;v<x.length;v++)p=Math.imul(p,31)+x.charCodeAt(v)|0;i.set(k,p)}}else p=Math.round(d[m]*1e3)|0;const O=Math.imul((a<<10)+m+1,2654435761)^Math.imul(l+1,2246822507);t=t+Math.imul(p^O,625341585)|0}}}return t}function ce(e,s,t){return{sheet:e.name,kind:e.kindName,table:e.table.name,view:T(e.view,s(e.table)),options:e.options,gantt:e.kindName==="gantt"?e.toJSON():void 0,cells:W(e,t)}}function V(e,s){const{manager:t,sheets:i,bindings:o,reports:l,book:n}=e,r=a=>s.find(c=>c.name===a.name);return{format:"8sheets-datasheets",version:M,tables:s.map(({map:a,...c})=>c),relationships:t.relationships.map(a=>({from:a.from.name,fromField:a.fromField,to:a.to.name,toField:a.toField,name:a.name,inverse:a.inverse})),views:[...t.tables.values()].flatMap(a=>[...a.views.values()].map(c=>({table:a.name,name:c.name,view:T(c,r(a))}))),sheets:i.map(a=>ce(a,r,n.strings)),bindings:o.map(a=>a.toJSON?a.toJSON():{kind:"view",sheet:a.sheet.name,range:a.range,table:a.table.name,view:T(a.view,r(a.table)),options:{header:a.options.header,grow:a.options.grow,editable:a.options.editable,sticky:a.options.sticky}}),reports:l.map(le)}}async function Ne(e){const{manager:s,sheets:t,bindings:i,reports:o}=e,l=e.sourceParts??[];if(!(s.tables.size>0||t.length>0||o.length>0||i.length>0))return{parts:[],replaced:l};const r=[],a=[];let c=0;for(const d of s.tables.values())a.push(await ae(d,c++,r));const f=U.encode(JSON.stringify(V(e,a)));return r.push({name:L,blob:new Blob([f]),bytes:f.length}),r.forEach((d,m)=>{d.file=K(m)}),{parts:r,replaced:l}}const fe=(()=>{const e=new Int8Array(256).fill(-1),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(let t=0;t<64;t++)e[s.charCodeAt(t)]=t;return e})();async function ue(e,s){const t=(await e.stream(s)).getReader(),{value:i}=await t.read();if(t.cancel().catch(()=>{}),!i)return null;const o=new TextDecoder().decode(i.subarray(0,400));if(!o.includes(q))return null;const l=/\bn="([^"]*)"/.exec(o)?.[1],n=Number(/\bb="(\d+)"/.exec(o)?.[1]??0);return l===void 0?null:{name:l,bytes:n,file:s}}async function H(e,s,t){const i=(await e.stream(s)).getReader(),o=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);let l=0,n=!1,r=0,a=0;for(;;){const{done:c,value:f}=await i.read();if(c)break;let d=0;if(!n){let m=0;for(;d<f.length;d++)if(f[d]===62&&(m++,m===2)){d++,n=!0;break}if(!n)continue}for(;d<f.length;d++){const m=fe[f[d]];m<0||(r=r<<6|m,a++,a===4&&(l+3<=o.length?(o[l]=r>>16,o[l+1]=r>>8&255,o[l+2]=r&255):(l<o.length&&(o[l]=r>>16),l+1<o.length&&(o[l+1]=r>>8&255)),l+=3,r=0,a=0))}}a===2&&l<o.length&&(o[l]=r>>4),a===3&&(l<o.length&&(o[l]=r>>10),l+1<o.length&&(o[l+1]=r>>2&255))}async function de(e,s,t){const i=s.addTable(t.name,{key:t.key,tracking:t.tracking,capacity:t.rowCount,fields:t.fields,windows:t.windows,schema:t.schema,remote:t.remote,autoSync:t.autoSync,batch:t.batch,indexes:t.indexes}),{dir:o}=t,l=new Float64Array(t.stringCount+1);await e(`${o}strings.idx`,l);const n=new Uint8Array(l[t.stringCount]);await e(`${o}strings.bin`,n);const r=new Int32Array(t.stringCount);for(let c=0;c<t.stringCount;c++)r[c]=s.strings.add(Y(n,l[c],l[c+1])),(c+1)%N===0&&await A();i.rowCount=t.rowCount;for(const c of t.columns){const f=i.byName.get(c.field);if(f){if(c.encoding==="i32"){const d=new Int32Array(t.rowCount);await e(`${o}${c.part}`,d);const{data:m}=f;for(let g=0;g<t.rowCount;g++){const p=d[g];m[g]=p<0?-1:r[p]}}else if(c.encoding==="mixed"){await e(`${o}${c.part}`,new Float64Array(f.data.buffer,0,t.rowCount)),f.kinds=new Uint8Array(i.capacity),await e(`${o}${c.kinds}`,new Uint8Array(f.kinds.buffer,0,t.rowCount));for(let d=0;d<t.rowCount;d++)f.kinds[d]===2&&(f.data[d]=r[f.data[d]])}else await e(`${o}${c.part}`,new Float64Array(f.data.buffer,0,t.rowCount));c.styles&&(f.styles=new Uint16Array(i.capacity),await e(`${o}${c.styles}`,new Uint16Array(f.styles.buffer,0,t.rowCount))),await A()}}await e(`${o}alive.bin`,new Uint8Array(i.alive.buffer,0,t.rowCount)),await e(`${o}state.bin`,new Uint8Array(i.state.buffer,0,t.rowCount));let a=0;for(let c=0;c<t.rowCount;c++)i.alive[c]===0&&a++;i.deletedCount=a;for(const[c,f]of t.originals)i.originals.set(c,new Map(f.map(([d,m])=>[i.byName.get(d)?.index,m]).filter(([d])=>d!==void 0)));return i.revision++,i.structureRevision++,i._markAllComputedStale(),i}function P(e,s){const t=new Q(e,s);return t.applySavedState(s),t}async function $e(e,s){const t=new Map,i=[];for(const c of e.entries.keys()){if(!c.startsWith("customXml/")||c.includes("/_rels/")||!c.endsWith(".xml")||/itemProps/i.test(c))continue;const f=await ue(e,c);f&&(t.set(f.name,f),i.push(c))}const o=t.get(L);if(!o)return!1;const l=new Uint8Array(o.bytes);await H(e,o.file,l);const n=JSON.parse(new TextDecoder().decode(l));if(n.format!=="8sheets-datasheets"||n.version>M)return!1;s.sourceParts=me(e,i);const r=async(c,f)=>{const d=t.get(c);d&&await H(e,d.file,f)},{manager:a}=s;for(const c of n.tables)await de(r,a,c);return X(n,s),s.loaded=!0,!0}function me(e,s){const t=[];for(const i of s){t.push(i);const o=i.slice(10),l=`customXml/_rels/${o}.rels`;if(e.has(l)){t.push(l);const n=/(\d+)\.xml$/.exec(o)?.[1];n&&e.has(`customXml/itemProps${n}.xml`)&&t.push(`customXml/itemProps${n}.xml`)}}return t}function he(e,s,t){return{view:s,fields:e.fields,calendar:new j(e.calendar),calendars:e.calendars,durationUnit:e.durationUnit,scaleLevel:e.scaleLevel,scale:e.scale,showCritical:e.showCritical,showBaseline:e.showBaseline,showLinks:e.showLinks,showLabels:e.showLabels,showToday:e.showToday,statusDate:e.statusDate,taskbarRules:e.taskbarRules,taskbarStyles:e.taskbarStyles,layout:e.layout,gridlines:e.gridlines,nonWorking:e.nonWorking,progressLine:e.progressLine,frozenLimit:e.frozenLimit,sheet:t}}function X(e,s){const{book:t,manager:i}=s;for(const n of e.relationships)i.addRelationship(n);for(const n of e.views??[]){const r=i.table(n.table);r.views.set(n.name,P(r,n.view))}const o=n=>t.sheets.find(r=>r.name===n),l=[];for(const n of e.sheets){const r=o(n.sheet);if(!r)continue;if(n.cells!==void 0&&!r.isVirtual&&W(r,t.strings)!==n.cells){l.push(n.sheet);continue}const a=i.table(n.table),c=P(a,n.view);let f;n.kind==="gantt"?(f=new z(t,n.sheet,a,he(n.gantt,c,n.options)),n.gantt.resourceTable&&(f.resourceTable=i.tables.get(n.gantt.resourceTable)??null,f.assignmentTable=i.tables.get(n.gantt.assignmentTable)??null,f.resourceNamesChanged())):f=new Z(t,n.sheet,c,n.options),f.adoptFrom(r),t.sheets[t.sheets.indexOf(r)]=f,s._registerSheet(f)}l.length>0&&s.loadNotes.push(se("{sheets} changed outside this app, so they stay plain sheets. The data tables are still there.",{sheets:l.join(", "),count:l.length}));for(const n of e.bindings){const r=o(n.sheet);if(r)if(n.kind==="paths"){const a=new ne(t,r,n.source?.table?n.source:n.source?.data??null);a.paths=new Map(n.paths),a.fieldOptions=new Map(n.fieldOptions??[]),a.refresh(),s._registerBinding(a)}else if(n.kind==="rows")s._registerBinding(new oe(t,r,n.anchor,n.data,{columns:n.columns,...n.options,table:n.table?t.engine?.tables.get(n.table.toUpperCase())??null:null}));else{const a=P(i.table(n.table),n.view);s._registerBinding(new te(t,r,n.range,a,n.options))}}for(const n of e.reports){const r=o(n.sheet);if(!r)continue;const a=new ee(i,r,{table:n.table,name:n.name,titleRows:n.titleRows,pageSetup:n.pageSetup,mode:n.mode,pagination:n.pagination,layout:n.layout,dataEntry:n.dataEntry,charts:n.charts,pictures:n.pictures,states:n.states,showHiddenRows:n.showHiddenRows,showHiddenCols:n.showHiddenCols});for(const c of n.bindings)a.setBinding(c.row,c.col,c);for(const c of n.params)a.addParam(c.name,c);a.filters=n.filters,a.output=n.output?o(n.output)??null:null,s.reports.push(a)}t.engine?.sheetsChanged(),t.engine?.rebuild()}const pe=5e3;function*we(e){const s=e.columns.filter(i=>$(i)&&!i.computed);let t=[];for(let i=0;i<e.rowCount;i++){if(e.alive[i]===0)continue;const o={};for(const l of s){const n=l.get(i);n!==null&&(o[l.name]=E(n))}t.push(o),t.length===pe&&(yield t,t=[])}t.length&&(yield t)}function Te(e,{rows:s=!0}={}){const{manager:t,book:i}=e,o=[...t.tables.values()].map(n=>{const r=s?[...we(n)].flat():[];return{name:n.name,key:n.key,tracking:n.tracking,windows:n.windowDefs,schema:n.schema,remote:_(n.remote),autoSync:n.autoSync,batch:n.batchSync,indexes:n.getIndexes(),fields:n.columns.filter($).map(F),rows:r}}),l=V(e,o.map(n=>({name:n.name,map:null})));l.tables=o;for(const n of l.sheets)delete n.cells;return l}function Pe(e,s){const{book:t,manager:i}=s;for(const o of e.tables){const{rows:l,...n}=o;i.addTable(o.name,n).load(l)}for(const o of e.sheets)t.sheets.some(l=>l.name===o.sheet)||t.addSheet(o.sheet);for(const o of e.reports??[])t.sheets.some(l=>l.name===o.sheet)||t.addSheet(o.sheet);X(e,s)}export{Ne as buildDataSheetPackage,Pe as dataSheetsFromJSON,Te as dataSheetsToJSON,he as ganttOptions,W as hashSheetCells,$e as readDataSheetPackage,we as rowBatches};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{CUSTOM_XML_CONTENT_TYPE as E,CUSTOM_XML_REL as S,customXmlNames as b}from"../../celltypes/persist.js";import{escapeRegExp as d}from"../../core/regexp.js";import{children as
|
|
2
|
-
<queries xmlns="${h}" version="1">${t}</queries>`}function
|
|
1
|
+
import{CUSTOM_XML_CONTENT_TYPE as E,CUSTOM_XML_REL as S,customXmlNames as b}from"../../celltypes/persist.js";import{escapeRegExp as d}from"../../core/regexp.js";import{TEXT_ENCODINGS as _}from"../../io/encoding.js";import{children as O,parseTree as N,unescapeOoxml as P}from"../../io/xml-scan.js";import{xmlText as A}from"../../io/xml-escape.js";import{STEP_OPS as R,COLUMN_TYPES as I,FILTER_OPS as M,MAX_DELIMITER as j}from"./steps.js";const h="urn:8sheets:getdata:1",i="customXml/",p="queries8c.xml",$="rId8cGetData",X=4*1024*1024,q=256,v=256,y=16384,D=1024,L=8192,U=new Set(["csv","json","xml","web","table","range","workbook"]),C=new Set(["auto","csv","json","xml","html"]),Q=new Set(Object.keys(_)),k=new Set([",",";"," ","|"]),l=(e,t=D)=>typeof e=="string"&&e.length<=t?e:null;function Y(e){const t=l(e,L);if(!t)return null;let n;try{n=new URL(t)}catch{return null}return n.protocol!=="http:"&&n.protocol!=="https:"||n.username||n.password?null:n.href}function F(e){if(e===null||typeof e!="object"||!U.has(e.type))return null;const t={type:e.type},n=l(e.fileName);if(n&&(t.fileName=n),e.type==="web"){if(t.url=Y(e.url),!t.url)return null;t.format=C.has(e.format)?e.format:"auto"}if(e.type==="table"&&(t.table=l(e.table),!t.table)||e.type==="range"&&(t.sheet=l(e.sheet),t.ref=l(e.ref),!t.sheet||!t.ref)||e.type==="workbook"&&(t.sheet=l(e.sheet),!t.sheet))return null;(k.has(e.delimiter)||typeof e.delimiter=="string"&&e.delimiter.length===1&&!/["\r\n]/.test(e.delimiter))&&(t.delimiter=e.delimiter),e.detectTypes===!1&&(t.detectTypes=!1),Number.isInteger(e.tableIndex)&&e.tableIndex>=0&&(t.tableIndex=e.tableIndex),Q.has(e.encoding)&&(t.encoding=e.encoding);const o=l(e.recordsPath);o&&(t.recordsPath=o);const s=l(e.recordPath);return s&&(t.recordPath=s),e.ndjson===!0&&(t.ndjson=!0),t}function G(e){if(e===null||typeof e!="object"||!R.includes(e.op))return null;const{op:t}=e;switch(t){case"promoteHeaders":return{op:t};case"chooseColumns":{if(!Array.isArray(e.names)||e.names.length>y)return null;const n=e.names.map(o=>l(o));return n.includes(null)?null:{op:t,names:n}}case"splitColumn":{const n=l(e.column),o=typeof e.delimiter=="string"&&e.delimiter.length>=1&&e.delimiter.length<=j?e.delimiter:null,s=Number.isInteger(e.parts)&&e.parts>=1&&e.parts<=100?e.parts:null;return n!==null&&o!==null&&s!==null?{op:t,column:n,delimiter:o,parts:s}:null}case"rename":{const n=l(e.from),o=l(e.to);return n!==null&&o?{op:t,from:n,to:o}:null}case"changeType":{const n=l(e.column);return n!==null&&Object.hasOwn(I,e.to)?{op:t,column:n,to:e.to}:null}case"filterRows":{const n=l(e.column);return n===null||!Object.hasOwn(M,e.test)?null:{op:t,column:n,test:e.test,value:l(e.value)??""}}case"removeDuplicates":{if(e.columns===null||e.columns===void 0)return{op:t,columns:null};if(!Array.isArray(e.columns)||e.columns.length>y)return null;const n=e.columns.map(o=>l(o));return n.includes(null)?null:{op:t,columns:n}}case"sort":{const n=l(e.column);return n!==null?{op:t,column:n,desc:e.desc===!0}:null}default:return null}}function g(e){if(e===null||typeof e!="object")return null;const t=l(e.id,64),n=l(e.name,255),o=F(e.source);if(!t||!n||!o||!Array.isArray(e.steps)||e.steps.length>v)return null;const s=e.steps.map(G);if(s.includes(null))return null;const u={id:t,name:n,source:o,steps:s},c=l(e.table);return c&&(u.table=c),e.connectionOnly===!0&&!c&&(u.connectionOnly=!0),u}function B(e){if(!e?.length)return null;const t=e.map(n=>{const o=g(n);return o?`<query>${A(JSON.stringify(o))}</query>`:""}).join("");return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<queries xmlns="${h}" version="1">${t}</queries>`}function J(e){let t;try{t=N(new TextEncoder().encode(e))}catch{return{queries:[],rejected:1}}const n=[];let o=0;const s=new Set;for(const u of O(t,"query").slice(0,q)){let c=null;try{c=JSON.parse(P(u.t))}catch{}const r=g(c);r&&!s.has(r.id)?(s.add(r.id),n.push(r)):o++}return{queries:n,rejected:o}}function H(e){const t=B(e);return t===null?null:{path:`${i}${p}`,xml:t,override:{partName:`/${i}${p}`,contentType:E},relationship:{id:$,type:S,target:`/${i}${p}`}}}const ee=e=>{const t=H(e.getDataQueries);return t?[t]:[]};async function x(e){const t=[];for(const n of b(e,X)){const o=await e.text(n);o.includes(h)&&t.push({name:n,text:o})}return t}async function te(e){const t=[];let n=0;for(const o of await x(e)){const s=J(o.text);t.push(...s.queries),n+=s.rejected}return{queries:t,rejected:n}}async function ne(e,t,n,o){let s=t,u=n;const c=r=>{s=s.replace(new RegExp(`<Override\\b[^>]*PartName="/${d(r)}"[^>]*/>`,"g"),"")};for(const{name:r}of await x(e)){o.add(r),c(r);const a=r.slice(i.length);u=u.replace(new RegExp(`<Relationship\\b[^>]*Target="[^"]*${d(i+a)}"[^>]*/>`,"g"),"");const f=`${i}_rels/${a}.rels`;if(e.has(f)){o.add(f);for(const T of(await e.text(f)).matchAll(/Target="([^"]+)"/g)){const m=`${i}${T[1].split("/").pop()}`;e.has(m)&&(o.add(m),c(m))}}}return{types:s,rels:u}}export{h as QUERIES_NS,Y as cleanUrl,ne as dropQueryParts,ee as getDataPackage,J as parseQueries,H as queriesPart,B as queriesXml,te as readQueries,x as readQueryParts,g as sanitizeQuery};
|
package/i18n/en/cells.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={"A table cannot be created on a protected sheet.":"A table cannot be created on a protected sheet.","Table creation was cancelled.":"Table creation was cancelled.","A formula cannot contain more than 8,192 characters.":"A formula cannot contain more than 8,192 characters.","A formula cannot nest more than 64 levels of functions.":"A formula cannot nest more than 64 levels of functions.","Text values in formulas are limited to 255 characters.":"Text values in formulas are limited to 255 characters.","The header row of a table cannot be deleted on its own.":"The header row of a table cannot be deleted on its own.","Move up":"Move up","Move down":"Move down","Move left":"Move left","Move right":"Move right","Edge of data, up":"Edge of data, up","Edge of data, down":"Edge of data, down","Edge of data, left":"Edge of data, left","Edge of data, right":"Edge of data, right","Beginning of row":"Beginning of row","Beginning of sheet":"Beginning of sheet","Last cell in use":"Last cell in use","End mode":"End mode","One screen down":"One screen down","One screen up":"One screen up","One screen right":"One screen right","One screen left":"One screen left","Scroll to the active cell":"Scroll to the active cell","Save As":"Save As","New workbook":"New workbook","Full screen":"Full screen","Keyboard shortcuts":"Keyboard shortcuts","Minimize or maximize the ribbon":"Minimize or maximize the ribbon","Next area of the window":"Next area of the window","Previous area of the window":"Previous area of the window","Repeat or redo":"Repeat or redo","Paste Special":"Paste Special","Clear selection":"Clear selection","Insert Options":"Insert Options","Format Same As Above":"Format Same As Above","Format Same As Below":"Format Same As Below","Format Same As Left":"Format Same As Left","Format Same As Right":"Format Same As Right","Clear Formatting":"Clear Formatting","Quick Analysis":"Quick Analysis","Color Scale":"Color Scale","Find the next match":"Find the next match","Insert a chart sheet":"Insert a chart sheet","Select the cells with notes":"Select the cells with notes","Paste values":"Paste values","Clear the active cell and edit it":"Clear the active cell and edit it","Fill down":"Fill down","Fill right":"Fill right","Insert cells":"Insert cells","Delete cells":"Delete cells","Edit the active cell":"Edit the active cell","Next cell in the selection, down":"Next cell in the selection, down","Next cell in the selection, right":"Next cell in the selection, right","Enter the date":"Enter the date","Enter the time":"Enter the time","Copy the value from the cell above":"Copy the value from the cell above","Copy the formula from the cell above":"Copy the formula from the cell above","Show values or formulas":"Show values or formulas",AutoSum:"AutoSum","Open the drop-down list":"Open the drop-down list","Flash Fill":"Flash Fill","Check spelling":"Check spelling","Calculate all":"Calculate all","Calculate the sheet":"Calculate the sheet","Check dependent formulas and calculate all":"Check dependent formulas and calculate all","Go To":"Go To","Formula Builder":"Formula Builder","Define Name":"Define Name","Create Names":"Create Names","Insert hyperlink":"Insert hyperlink","Insert or edit a note":"Insert or edit a note","Insert or reply to a threaded comment":"Insert or reply to a threaded comment","Show the context menu":"Show the context menu",Scripts:"Scripts","Create table":"Create table","Insert a sheet":"Insert a sheet","Insert a chart":"Insert a chart","Get Data":"Get Data","Draw tab":"Draw tab","Add or remove a filter":"Add or remove a filter","Show or hide outline symbols":"Show or hide outline symbols","Show every outline level":"Show every outline level",Bold:"Bold",Italic:"Italic",Underline:"Underline",Strikethrough:"Strikethrough","Increase font size":"Increase font size","Decrease font size":"Decrease font size","Align center":"Align center","Align left":"Align left","Modify Cell Style":"Modify Cell Style","General format":"General format","Currency format":"Currency format","Percentage format":"Percentage format","Exponential format":"Exponential format","Date format":"Date format","Time format":"Time format","Number format":"Number format","Outline border":"Outline border","Right border":"Right border","Left border":"Left border","Top border":"Top border","Bottom border":"Bottom border","Remove borders":"Remove borders","Hide columns":"Hide columns","Unhide columns":"Unhide columns","Hide rows":"Hide rows","Unhide rows":"Unhide rows","Select the region or the sheet":"Select the region or the sheet","Select the whole sheet":"Select the whole sheet","Select the column":"Select the column","Select the row":"Select the row","Only the active cell":"Only the active cell","Next corner of the selection":"Next corner of the selection","Extend selection":"Extend selection","Add to selection":"Add to selection","Select only visible cells":"Select only visible cells","Select the current region":"Select the current region","Select the current array":"Select the current array","Row differences":"Row differences","Column differences":"Column differences","Direct precedents":"Direct precedents","All precedents":"All precedents","Direct dependents":"Direct dependents","All dependents":"All dependents","Go To Special":"Go To Special","Hide or show objects":"Hide or show objects","Expand or collapse the formula bar":"Expand or collapse the formula bar","Formula tooltips on or off":"Formula tooltips on or off","Status bar":"Status bar","Frequently used":"Frequently used","Windows and dialogs":"Windows and dialogs","Move and scroll":"Move and scroll","Enter data":"Enter data","Cells and formula bar":"Cells and formula bar","Format and edit":"Format and edit","Select cells, columns or rows":"Select cells, columns or rows","Work with a selection":"Work with a selection",Charts:"Charts","Sort and filter":"Sort and filter",Outline:"Outline","Function keys":"Function keys",Drawing:"Drawing","Close window":"Close window","The browser closes the tab; a page cannot take these keys.":"The browser closes the tab; a page cannot take these keys.","Quit Excel":"Quit Excel","macOS quits the browser.":"macOS quits the browser.","Bound, but a browser tab keeps Cmd+N, Cmd+T and Cmd+Shift+P for itself; they reach the app only when it runs installed. File > New works everywhere.":"Bound, but a browser tab keeps Cmd+N, Cmd+T and Cmd+Shift+P for itself; they reach the app only when it runs installed. File > New works everywhere.","Create table or toggle reference":"Create table or toggle reference","Bound; in a browser tab Cmd+T opens a tab. Use Ctrl+T, or F4 for references.":"Bound; in a browser tab Cmd+T opens a tab. Use Ctrl+T, or F4 for references.","Switch app, hide, screenshot":"Switch app, hide, screenshot","macOS keeps these.":"macOS keeps these.","Minimize, maximize window":"Minimize, maximize window","A page has no control over its window.":"A page has no control over its window.","Special characters":"Special characters","macOS opens its character picker, which types into the cell as usual.":"macOS opens its character picker, which types into the cell as usual.",Thesaurus:"Thesaurus","Smart Lookup":"Smart Lookup","This online service is not in the app.":"This online service is not in the app.","Excel 4.0 macro sheet":"Excel 4.0 macro sheet","Not in the app; Opt+F11 and Opt+F8 open Scripts instead of Visual Basic.":"Not in the app; Opt+F11 and Opt+F8 open Scripts instead of Visual Basic.","New chart sheet":"New chart sheet","Chart sheets are not in the app; F11 inserts a chart on the sheet.":"Chart sheets are not in the app; F11 inserts a chart on the sheet.",Copilot:"Copilot","Copilot is not in the app.":"Copilot is not in the app.","Object button menu":"Object button menu","Paste offers its options on the Home tab.":"Paste offers its options on the Home tab.","Keyboard Shortcuts":"Keyboard Shortcuts","Find a command or key":"Find a command or key","Filter shortcuts":"Filter shortcuts",Yours:"Yours","Back to the default":"Back to the default","This key does nothing here until reset":"This key does nothing here until reset",Command:"Command","Press keys":"Press keys","New shortcut":"New shortcut",Assign:"Assign",Keys:"Keys","heading|Group":"Group",Horizontal:"Horizontal",Vertical:"Vertical","Diagonal up":"Diagonal up","Diagonal down":"Diagonal down","From corner":"From corner","From center":"From center",Sample:"Sample","Fill Effects":"Fill Effects","Color 1:":"Color 1:","Color 2:":"Color 2:","Shading styles:":"Shading styles:","Variants:":"Variants:","Text shown in an empty cell":"Text shown in an empty cell",Always:"Always","When the cell is empty or active":"When the cell is empty or active","Only when empty":"Only when empty","Top left":"Top left","Top center":"Top center","Top right":"Top right","Bottom left":"Bottom left","Bottom center":"Bottom center","Bottom right":"Bottom right","Left center":"Left center","Right center":"Right center","Cell Padding and Label":"Cell Padding and Label","Padding, in points":"Padding, in points",Top:"Top",Right:"Right",Bottom:"Bottom",Left:"Left",Center:"Center","Watermark or label":"Watermark or label","Keep it visible as a label":"Keep it visible as a label","Show:":"Show:","Position:":"Position:","Color:":"Color:","Size:":"Size:","Margin:":"Margin:","Cell Decoration":"Cell Decoration","Corner fold":"Corner fold","Corner:":"Corner:",Icon:"Icon","Add icon:":"Add icon:","Side:":"Side:","Remove icons":"Remove icons",Stretch:"Stretch","layout|Center":"Center","layout|Zoom":"Zoom","Cell Background Image":"Cell Background Image","Picture:":"Picture:","Layout:":"Layout:","Remove the picture":"Remove the picture","Selected cells":"Selected cells","This row":"This row","This column":"This column","This sheet":"This sheet",Tag:"Tag","Cell Tag":"Cell Tag","A note for formulas and scripts. It is not shown in the cell.":"A note for formulas and scripts. It is not shown in the cell.","Apply to:":"Apply to:","Input Mask":"Input Mask","Pattern:":"Pattern:","Try typing here":"Try typing here","Stores: {value}":"Stores: {value}","a letter, 0 digit, # any, > upper, < lower, [a-f] set, (am|pm) choice, \\x fixed x, {n,m} length; dates: yyyy MM dd HH mm ss tt; = takes the pattern from a formula.":"a letter, 0 digit, # any, > upper, < lower, [a-f] set, (am|pm) choice, \\x fixed x, {n,m} length; dates: yyyy MM dd HH mm ss tt; = takes the pattern from a formula.","Placeholder:":"Placeholder:","Store without fixed characters":"Store without fixed characters","Store without placeholders":"Store without placeholders","Sample:":"Sample:","That pattern has no place to type.":"That pattern has no place to type.","Select a cell with a picture in it first. Use Insert > Pictures > Place in Cell.":"Select a cell with a picture in it first. Use Insert > Pictures > Place in Cell.","Describes the picture; sort and filter use it":"Describes the picture; sort and filter use it","Picture in Cell":"Picture in Cell","Alt text:":"Alt text:","Size, in points; 0 fits the cell":"Size, in points; 0 fits the cell","Crop, in the picture's pixels; 0 keeps all of it":"Crop, in the picture's pixels; 0 keeps all of it","Horizontal:":"Horizontal:","Vertical:":"Vertical:","Excel has no size or crop for a picture in a cell, and fits it there.":"Excel has no size or crop for a picture in a cell, and fits it there.","Place over Cells":"Place over Cells","Down columns":"Down columns","Across rows":"Across rows",Both:"Both","Free: equal neighbors merge":"Free: equal neighbors merge","Restricted: only where the columns to the left also merge":"Restricted: only where the columns to the left also merge","Selecting a cell selects that cell":"Selecting a cell selects that cell","Selecting a cell selects the merged area":"Selecting a cell selects the merged area","Auto Merge":"Auto Merge","Equal neighbors show as one cell. The data stays as it is.":"Equal neighbors show as one cell. The data stays as it is.","Direction:":"Direction:","Mode:":"Mode:","Selection:":"Selection:","Column Width":"Column Width","Row Height":"Row Height","Column width:":"Column width:","Row height:":"Row height:","Also * or 2* for a share of the free space, or auto to follow the content.":"Also * or 2* for a share of the free space, or auto to follow the content.","Freeze Last Rows and Columns":"Freeze Last Rows and Columns","Last rows of the data:":"Last rows of the data:","Last columns of the data:":"Last columns of the data:","Keep them at the edge of the window":"Keep them at the edge of the window","Excel has no such panes: in Excel these rows and columns scroll with the sheet.":"Excel has no such panes: in Excel these rows and columns scroll with the sheet.","(empty)":"(empty)","No changes.":"No changes.","Tracking is off.":"Tracking is off.","Changed Cells":"Changed Cells","Keep track of changed cells on this sheet":"Keep track of changed cells on this sheet","Padding and Label…":"Padding and Label…","Corner Fold and Icons…":"Corner Fold and Icons…","Background Image…":"Background Image…","Input Mask…":"Input Mask…","Cell Tag…":"Cell Tag…","Picture in Cell…":"Picture in Cell…","Ellipsis for Long Text":"Ellipsis for Long Text","Tip for Cut Text":"Tip for Cut Text",Overline:"Overline","Single Accounting Underline":"Single Accounting Underline","Double Accounting Underline":"Double Accounting Underline","IME: Automatic":"IME: Automatic","IME: On":"IME: On","IME: Off":"IME: Off","IME: Disabled":"IME: Disabled","Auto Merge…":"Auto Merge…","Drag the Selection to Merge":"Drag the Selection to Merge","Changed Cells…":"Changed Cells…",Split:"Split","Freeze Last Rows and Columns…":"Freeze Last Rows and Columns…","Column Size…":"Column Size…","Row Size…":"Row Size…","Split Resize":"Split Resize","Drag Column and Row Headers to Move":"Drag Column and Row Headers to Move","Drag Column Headers to Move":"Drag Column Headers to Move","Drag Row Headers to Move":"Drag Row Headers to Move","Place over Cells…":"Place over Cells…","Place in Cell…":"Place in Cell…","Place over Cells from URL…":"Place over Cells from URL…","Place in Cell from URL…":"Place in Cell from URL…","Picture from URL":"Picture from URL","Downloading the picture…":"Downloading the picture…","Scroll up one row":"Scroll up one row","Scroll down one row":"Scroll down one row","Scroll left one column":"Scroll left one column","Scroll right one column":"Scroll right one column",Black:"Black","Dark Gray":"Dark Gray",Gray:"Gray",Red:"Red",Green:"Green",Blue:"Blue",Teal:"Teal",Purple:"Purple",Orange:"Orange","In this sheet":"In this sheet","Sheet tabs":"Sheet tabs","Horizontal scroll bar":"Horizontal scroll bar","Vertical scroll bar":"Vertical scroll bar",Headings:"Headings",Gridlines:"Gridlines","Outline symbols":"Outline symbols","Zero values":"Zero values","Gridline color:":"Gridline color:","Horizontal gridlines":"Horizontal gridlines","Vertical gridlines":"Vertical gridlines",Scrolling:"Scrolling","Scroll bars:":"Scroll bars:","As on macOS":"As on macOS","Always visible, with arrows":"Always visible, with arrows",Thin:"Thin","Scroll Bars and Border…":"Scroll Bars and Border…","Scroll by whole rows and columns":"Scroll by whole rows and columns","Scroll bars span the whole sheet":"Scroll bars span the whole sheet","End scrolling at the last used cell":"End scrolling at the last used cell","Wheel speed:":"Wheel speed:","Tab strip":"Tab strip","New sheet button":"New sheet button","Navigation arrows":"Navigation arrows","Sheets can be reordered":"Sheets can be reordered","Sheets can be renamed":"Sheets can be renamed","All sheets button:":"All sheets button:","When needed":"When needed",Never:"Never","View Options":"View Options","Use {name}":"Use {name}","Border around the workbook":"Border around the workbook","Border style":"Border style","line|Solid":"Solid","line|Dashed":"Dashed","line|Dotted":"Dotted","line|Double":"Double","Border width":"Border width","Border color":"Border color","Scroll Bars and Border":"Scroll Bars and Border","Scroll bars":"Scroll bars","Style:":"Style:","Thumb color":"Thumb color","Track color":"Track color",Selection:"Selection","Fill color":"Fill color","Show a border":"Show a border","Width:":"Width:",Strength:"Strength","Focus Cell":"Focus Cell","Highlight the row and column of the active cell":"Highlight the row and column of the active cell","Row color:":"Row color:","Column color:":"Column color:","Strength:":"Strength:","Editing Options":"Editing Options","After pressing Return, move:":"After pressing Return, move:","dir|Down":"Down","dir|Right":"Right","dir|Up":"Up","dir|Left":"Left","Don't move":"Don't move","Fixed decimal places:":"Fixed decimal places:","Cmd over a selected cell takes it out of the selection":"Cmd over a selected cell takes it out of the selection","Cmd and the arrow keys take cells out of the selection":"Cmd and the arrow keys take cells out of the selection","Zoom with Cmd and the wheel":"Zoom with Cmd and the wheel","Keep undo history":"Keep undo history","Context menus":"Context menus",Tips:"Tips","Size while resizing":"Size while resizing","Row or column while scrolling":"Row or column while scrolling","Value while filling":"Value while filling","Place while dragging cells":"Place while dragging cells","An outline can have up to eight levels.":"An outline can have up to eight levels.","Cannot ungroup that selection.":"Cannot ungroup that selection.","There is no detail to show or hide here.":"There is no detail to show or hide here.","Auto Outline":"Auto Outline","Cannot create an outline.":"Cannot create an outline.","There is no outline here to style.":"There is no outline here to style.","outline|Direction":"Direction","Summary rows below detail":"Summary rows below detail","Summary columns to right of detail":"Summary columns to right of detail","Automatic styles":"Automatic styles",Create:"Create","Apply Styles":"Apply Styles","Choose…":"Choose…","Line width":"Line width","Outline area":"Outline area",Buttons:"Buttons","Numbers and + -":"Numbers and + -","Lines and button borders":"Lines and button borders",Dots:"Dots","Picture for +":"Picture for +","Picture for -":"Picture for -","Outline Symbols":"Outline Symbols","Default Look":"Default Look","No limit":"No limit","Deepest level":"Deepest level","Picture for level {level}":"Picture for level {level}","Column:":"Column:","Show expand and collapse marks":"Show expand and collapse marks","Show check boxes":"Show check boxes","Deepest level:":"Deepest level:","Expanded mark":"Expanded mark","Collapsed mark":"Collapsed mark","Each cell's indent sets its level in the tree. Increase Indent on the Home tab changes it.":"Each cell's indent sets its level in the tree. Increase Indent on the Home tab changes it.","Outline Column":"Outline Column","Level {level}":"Level {level}","Show All Levels":"Show All Levels","Show Detail":"Show Detail","Hide Detail":"Hide Detail","Show Outline Symbols":"Show Outline Symbols","Hide Outline Symbols":"Hide Outline Symbols","Settings…":"Settings…","Outline Symbols…":"Outline Symbols…","Outline Column…":"Outline Column…",Subject:"Subject",Author:"Author",Manager:"Manager",Company:"Company",Category:"Category",Keywords:"Keywords","Hyperlink base":"Hyperlink base","Yes or no":"Yes or no","Property name":"Property name","Yes or No":"Yes or No","Give the property a name.":"Give the property a name.","That value doesn't suit the type {type}.":"That value doesn't suit the type {type}.","Value:":"Value:","Add or Modify":"Add or Modify",Summary:"Summary",Statistics:"Statistics",Content:"Content",Custom:"Custom","Excel Workbook (.xlsx)":"Excel Workbook (.xlsx)","Location:":"Location:","{kb} KB ({bytes} bytes)":{one:"{kb} KB ({bytes} byte)",other:"{kb} KB ({bytes} bytes)"},"Not saved yet":"Not saved yet","Created:":"Created:","Modified:":"Modified:","Sheets:":"Sheets:","Attributes:":"Attributes:","Read-only":"Read-only",Editable:"Editable","attr|Hidden":"Hidden",Created:"Created",Modified:"Modified",Printed:"Printed","Last saved by":"Last saved by",Revision:"Revision","Total editing time":"Total editing time","{count} minutes":{one:"{count} minute",other:"{count} minutes"},Application:"Application",Version:"Version",Worksheets:"Worksheets","{name} (hidden)":"{name} (hidden)","{name} Properties":"{name} Properties","First sheet":"First sheet","Scroll tabs left":"Scroll tabs left","Scroll tabs right":"Scroll tabs right","Last sheet":"Last sheet","All sheets":"All sheets","A workbook must contain at least one visible sheet.":"A workbook must contain at least one visible sheet.",'Delete "{name}"? This can\'t be undone.':`Delete "{name}"? This can't be undone.`,"Delete these {count} sheets? This can't be undone.":{one:"Delete this {count} sheet? This can't be undone.",other:"Delete these {count} sheets? This can't be undone."},"Hidden sheets":"Hidden sheets","Unhide one or more sheets:":"Unhide one or more sheets:","Before sheet":"Before sheet","(move to end)":"(move to end)","To book":"To book","Move or Copy":"Move or Copy","To book:":"To book:","Before sheet:":"Before sheet:","Create a copy":"Create a copy","Sheet name":"Sheet name","A sheet name has 1 to 31 characters, none of \\ / ? * [ ] :, and doesn't begin or end with an apostrophe.":"A sheet name has 1 to 31 characters, none of \\ / ? * [ ] :, and doesn't begin or end with an apostrophe.","That name is already taken. Try a different one.":"That name is already taken. Try a different one.","History is a reserved name. Try a different one.":"History is a reserved name. Try a different one.","Insert Sheet":"Insert Sheet","Delete Sheets":"Delete Sheets","Move or Copy…":"Move or Copy…",Duplicate:"Duplicate","Unprotect Sheet…":"Unprotect Sheet…","Protect Sheet…":"Protect Sheet…","Tab Color":"Tab Color","Hide Sheets":"Hide Sheets","Unhide…":"Unhide…","Select All Sheets":"Select All Sheets","Ungroup Sheets":"Ungroup Sheets","Drag to share the width between tabs and scroll bar":"Drag to share the width between tabs and scroll bar","Paste Options":"Paste Options","Keep Source Formatting":"Keep Source Formatting","Formulas & Number Formatting":"Formulas & Number Formatting","No Borders":"No Borders","Keep Source Column Widths":"Keep Source Column Widths",Transpose:"Transpose","Merge Conditional Formatting":"Merge Conditional Formatting","Values & Number Formatting":"Values & Number Formatting","Values & Source Formatting":"Values & Source Formatting",Formatting:"Formatting","Paste Link":"Paste Link","Linked Picture":"Linked Picture","Copy cells in this workbook first, then use Paste Special.":"Copy cells in this workbook first, then use Paste Special.","Paste Special…":"Paste Special…","paste|All":"All","All except borders":"All except borders","Column widths":"Column widths","Formulas and number formats":"Formulas and number formats",Formats:"Formats","Values and number formats":"Values and number formats","Notes and comments":"Notes and comments","All merging conditional formats":"All merging conditional formats",Validation:"Validation",Subtract:"Subtract",Multiply:"Multiply",Divide:"Divide","Paste Special works on copied cells, not on cut ones. Use Paste, or copy the cells instead.":"Paste Special works on copied cells, not on cut ones. Use Paste, or copy the cells instead.","Skip blanks":"Skip blanks","Skip hidden rows and columns":"Skip hidden rows and columns",Operation:"Operation","Text to display":"Text to display","ScreenTip…":"ScreenTip…",ScreenTip:"ScreenTip","ScreenTip text:":"ScreenTip text:",Address:"Address","Cell reference":"Cell reference","Email address":"Email address","File to link to":"File to link to","file|Select…":"Select…","Web Page or File":"Web Page or File","This Document":"This Document","Email Address":"Email Address","Link to an existing file or web page.":"Link to an existing file or web page.","Link to a place in this document.":"Link to a place in this document.","Link to an email address.":"Link to an email address.","Address:":"Address:","Cell reference:":"Cell reference:","Sheet:":"Sheet:","Email address:":"Email address:","Subject:":"Subject:","Remove Link":"Remove Link","Enter an address.":"Enter an address.","Enter a cell reference.":"Enter a cell reference.","Enter an email address.":"Enter an email address.","Edit Hyperlink":"Edit Hyperlink","Insert Hyperlink":"Insert Hyperlink","Text to Display:":"Text to Display:","Reference isn't valid: {ref}":"Reference isn't valid: {ref}","This link points to {target}, which a web page can't open.":"This link points to {target}, which a web page can't open.","{where} - Click once to follow. Click and hold to select this cell.":"{where} - Click once to follow. Click and hold to select this cell.","Across Worksheets…":"Across Worksheets…","Series…":"Series…",Justify:"Justify","Custom Lists…":"Custom Lists…","Editing Options…":"Editing Options…",Trend:"Trend","Series in:":"Series in:","series|Linear":"Linear",Growth:"Growth",AutoFill:"AutoFill","Date unit:":"Date unit:",Day:"Day",Weekday:"Weekday",Month:"Month",Year:"Year","Step value":"Step value","Stop value":"Stop value","Step value:":"Step value:","Stop value:":"Stop value:","fill|Series":"Series","This workbook has no other sheet to fill.":"This workbook has no other sheet to fill.","fill|Fill":"Fill",Contents:"Contents","Fill Across Sheets":"Fill Across Sheets","Cells that hold numbers or formulas can't be justified.":"Cells that hold numbers or formulas can't be justified.","Text will extend below selected range.":"Text will extend below selected range.","To do this, all the merged cells need to be the same size.":"To do this, all the merged cells need to be the same size.","You can't change part of an array.":"You can't change part of an array.","Auto Fill Options":"Auto Fill Options","Copy Cells":"Copy Cells","Fill Series":"Fill Series","Fill Formatting Only":"Fill Formatting Only","Fill Without Formatting":"Fill Without Formatting","Fill Days":"Fill Days","Fill Weekdays":"Fill Weekdays","Fill Months":"Fill Months","Fill Years":"Fill Years","Width: {count} pixels":{one:"Width: {count} pixel",other:"Width: {count} pixels"},"Height: {count} pixels":{one:"Height: {count} pixel",other:"Height: {count} pixels"},"Row: {row}":"Row: {row}","Column: {col}":"Column: {col}","The information can't be pasted because the Copy area and the paste area aren't the same size and shape.":"The information can't be pasted because the Copy area and the paste area aren't the same size and shape.","The information can't be pasted because the Cut area and the paste area aren't the same size and shape.":"The information can't be pasted because the Cut area and the paste area aren't the same size and shape.","We can't do that to a merged cell.":"We can't do that to a merged cell.","This action won't work on multiple selections.":"This action won't work on multiple selections.","You can't change part of a data table.":"You can't change part of a data table.","The information can't be pasted because it would run off the end of the sheet.":"The information can't be pasted because it would run off the end of the sheet.","There are no visible cells to paste.":"There are no visible cells to paste.","The copied cells are no longer there.":"The copied cells are no longer there.","Cannot change this part of a PivotTable report.":"Cannot change this part of a PivotTable report.","This operation is not allowed. The operation is attempting to shift cells in a table on your worksheet.":"This operation is not allowed. The operation is attempting to shift cells in a table on your worksheet.","To prevent possible loss of data, cells can't be shifted off the end of the sheet.":"To prevent possible loss of data, cells can't be shifted off the end of the sheet.","Shift cells right":"Shift cells right","Shift cells down":"Shift cells down","Shift cells left":"Shift cells left","Shift cells up":"Shift cells up","Entire row":"Entire row","Entire column":"Entire column","Insert Cut Cells…":"Insert Cut Cells…","Insert Copied Cells…":"Insert Copied Cells…","Insert Cut Cells":"Insert Cut Cells","Insert Copied Cells":"Insert Copied Cells","The command can't be used on overlapping selections.":"The command can't be used on overlapping selections.","There's already data here. Do you want to replace it?":"There's already data here. Do you want to replace it?",Subtotal:"Subtotal",StdDevp:"StdDevp",Varp:"Varp","Select a cell inside a list with a header row first.":"Select a cell inside a list with a header row first.","Column {col}":"Column {col}","At each change in":"At each change in","Use function":"Use function","At each change in:":"At each change in:","Use function:":"Use function:","Add subtotal to:":"Add subtotal to:","Replace current subtotals":"Replace current subtotals","Page break between groups":"Page break between groups","Summary below data":"Summary below data","Remove All":"Remove All","Choose at least one column to add a subtotal to.":"Choose at least one column to add a subtotal to.",List:"List","List:":"List:","Bullet •":"Bullet •","Circle ◦":"Circle ◦","Square ▪":"Square ▪",Superscript:"Superscript",Subscript:"Subscript",Outdent:"Outdent","list|Indent":"Indent","Rich Text":"Rich Text","Note on {ref}":"Note on {ref}","Font size":"Font size",Alignment:"Alignment","align|Left":"Left","align|Center":"Center","align|Right":"Right","Format Note":"Format Note","Fill color:":"Fill color:","Text color:":"Text color:","Font size:":"Font size:","Alignment:":"Alignment:","Border color:":"Border color:","Border style:":"Border style:","Border width:":"Border width:","Always show this note":"Always show this note","Move with cells":"Move with cells","Size with cells":"Size with cells",Locked:"Locked","Lock text":"Lock text",Typing:"Typing","undo|Fill":"Fill",Borders:"Borders","Merge Cells":"Merge Cells","Insert or Delete":"Insert or Delete","Insert or Delete Cells":"Insert or Delete Cells","Move Cells":"Move Cells","Cell Style":"Cell Style",Action:"Action","Nothing to undo.":"Nothing to undo.","Nothing to redo.":"Nothing to redo.","Undo {count} actions":{one:"Undo {count} Action",other:"Undo {count} Actions"},"Redo {count} actions":{one:"Redo {count} Action",other:"Redo {count} Actions"},"Undo list":"Undo list","Redo list":"Redo list","Expand or collapse the formula bar (⌃⇧U)":"Expand or collapse the formula bar (⌃⇧U)","Copy takes headers":"Copy takes headers","Copy takes headers:":"Copy takes headers:","Row headers":"Row headers","Column headers":"Column headers",Overflow:"Overflow","Text overflows into empty cells on this sheet":"Text overflows into empty cells on this sheet","Allow editing directly in cells":"Allow editing directly in cells","Start editing as soon as a cell is selected":"Start editing as soon as a cell is selected","Select all the text when editing starts":"Select all the text when editing starts","Enable automatic percent entry":"Enable automatic percent entry","Enable AutoComplete for cell values":"Enable AutoComplete for cell values","Let numbers too wide for a column spill into empty cells (not in Excel)":"Let numbers too wide for a column spill into empty cells (not in Excel)","Enable fill handle and cell drag-and-drop":"Enable fill handle and cell drag-and-drop","Alert before overwriting cells":"Alert before overwriting cells","Show Paste Options button after content is pasted":"Show Paste Options button after content is pasted","Show Auto Fill Options button after a fill":"Show Auto Fill Options button after a fill","Paste skips hidden rows and columns":"Paste skips hidden rows and columns","Dragging whole table rows shifts cells instead of overwriting":"Dragging whole table rows shifts cells instead of overwriting","Header Text…":"Header Text…","Header Rows…":"Header Rows…","Header Columns…":"Header Columns…","Header Rows":"Header Rows","Header Columns":"Header Columns","How many:":"How many:","Merge Header Cells":"Merge Header Cells","Unmerge Header Cells":"Unmerge Header Cells","Default value":"Default value","For the selected cells. A formula starts with =.":"For the selected cells. A formula starts with =.","For the selection from {ref}. A formula starts with =.":"For the selection from {ref}. A formula starts with =.","Show this while the cell is empty:":"Show this while the cell is empty:","Default Value":"Default Value","That formula has a problem.":"That formula has a problem.","Custom lists":"Custom lists","List entries":"List entries","Import list from cells":"Import list from cells","NEW LIST":"NEW LIST",Update:"Update",Import:"Import","Custom lists:":"Custom lists:","List entries:":"List entries:","Import list from cells:":"Import list from cells:","Custom Lists":"Custom Lists","Links can't be created to source areas on the destination sheet.":"Links can't be created to source areas on the destination sheet.","Standard Width":"Standard Width","Standard column width:":"Standard column width:","Row Height…":"Row Height…","AutoFit Row Height":"AutoFit Row Height","Column Width…":"Column Width…","AutoFit Selection":"AutoFit Selection","Standard Width…":"Standard Width…","Hide & Unhide":"Hide & Unhide","Hide Rows":"Hide Rows","Hide Columns":"Hide Columns","Unhide Rows":"Unhide Rows","Unhide Columns":"Unhide Columns","Header Color…":"Header Color…",AutoCorrect:"AutoCorrect","Correct TWo INitial CApitals":"Correct TWo INitial CApitals","Capitalize names of days":"Capitalize names of days","Correct accidental use of cAPS LOCK key":"Correct accidental use of cAPS LOCK key","Replace text as you type":"Replace text as you type",With:"With",Replacements:"Replacements","Replace:":"Replace:","With:":"With:","Reply to Comment":"Reply to Comment","Delete Comment":"Delete Comment","New Comment":"New Comment","Edit Note":"Edit Note","New Note":"New Note","Delete Note":"Delete Note","Hide Note":"Hide Note","Show Note":"Show Note","Format Note…":"Format Note…","Show All Notes":"Show All Notes","Hide All Notes":"Hide All Notes","Define Name…":"Define Name…","Link…":"Link…","This value doesn't match the data validation rules for this cell.":"This value doesn't match the data validation rules for this cell.","Continue?":"Continue?",Retry:"Retry","Invalid value":"Invalid value","Check this value":"Check this value","Custom zoom percent":"Custom zoom percent","Custom:":"Custom:","Zoom to:":"Zoom to:","Fit selection":"Fit selection","Defined {name} as {refers}":"Defined {name} as {refers}",'"{text}" is not a valid reference or name':'"{text}" is not a valid reference or name','"{name}" is hidden':'"{name}" is hidden',"Names and tables":"Names and tables","No names defined":"No names defined","Drag to resize the name box":"Drag to resize the name box","Panes can't be split while they're frozen. Unfreeze them first.":"Panes can't be split while they're frozen. Unfreeze them first.","Keep typing to narrow the list.":"Keep typing to narrow the list.","This data type has no fields stored in the file.":"This data type has no fields stored in the file.","Values saved in the file. Data types don't refresh in this app.":"Values saved in the file. Data types don't refresh in this app.","Merging cells keeps only the first value and discards the other values.":"Merging cells keeps only the first value and discards the other values.","Insert {count} Columns Left":{one:"Insert {count} Column Left",other:"Insert {count} Columns Left"},"Insert {count} Columns Right":{one:"Insert {count} Column Right",other:"Insert {count} Columns Right"},"Insert {count} Rows Above":{one:"Insert {count} Row Above",other:"Insert {count} Rows Above"},"Insert {count} Rows Below":{one:"Insert {count} Row Below",other:"Insert {count} Rows Below"},"{count} Rows Above":{one:"{count} Row Above",other:"{count} Rows Above"},"{count} Rows Below":{one:"{count} Row Below",other:"{count} Rows Below"},"{count} Columns Left":{one:"{count} Column Left",other:"{count} Columns Left"},"{count} Columns Right":{one:"{count} Column Right",other:"{count} Columns Right"},"Rows {label}":{one:"Row {label}",other:"Rows {label}"},"Columns {label}":{one:"Column {label}",other:"Columns {label}"},"Delete Rows {label}":{one:"Delete Row {label}",other:"Delete Rows {label}"},"Delete Columns {label}":{one:"Delete Column {label}",other:"Delete Columns {label}"},"Hide Rows {label}":{one:"Hide Row {label}",other:"Hide Rows {label}"},"Hide Columns {label}":{one:"Hide Column {label}",other:"Hide Columns {label}"},"The value must be between 0 and {max}.":"The value must be between 0 and {max}.","Number Stored as Text":"Number Stored as Text","Convert to Number":"Convert to Number","Ignore Error":"Ignore Error","Edit in Formula Bar":"Edit in Formula Bar","Error Checking Options…":"Error Checking Options…","Error Checking Options":"Error Checking Options","Enable background error checking":"Enable background error checking","Error checking rules":"Error checking rules","Numbers formatted as text or preceded by an apostrophe":"Numbers formatted as text or preceded by an apostrophe","Linear Trend":"Linear Trend","Growth Trend":"Growth Trend","Page breaks":"Page breaks","All using Source theme":"All using Source theme","(Showing All)":"(Showing All)","Filtered by date":"Filtered by date","Equals {values} or {count} more":"Equals {values} or {count} more",or:"or","Top {n} Items":"Top {n} Items","Top {n} Percent":"Top {n} Percent","Bottom {n} Items":"Bottom {n} Items","Bottom {n} Percent":"Bottom {n} Percent","Filtered by color":"Filtered by color","Filtered by icon":"Filtered by icon",Filtered:"Filtered"};export{e as default};
|
|
1
|
+
var e={"A table cannot be created on a protected sheet.":"A table cannot be created on a protected sheet.","Table creation was cancelled.":"Table creation was cancelled.","A formula cannot contain more than 8,192 characters.":"A formula cannot contain more than 8,192 characters.","A formula cannot nest more than 64 levels of functions.":"A formula cannot nest more than 64 levels of functions.","Text values in formulas are limited to 255 characters.":"Text values in formulas are limited to 255 characters.","The header row of a table cannot be deleted on its own.":"The header row of a table cannot be deleted on its own.","Move up":"Move up","Move down":"Move down","Move left":"Move left","Move right":"Move right","Edge of data, up":"Edge of data, up","Edge of data, down":"Edge of data, down","Edge of data, left":"Edge of data, left","Edge of data, right":"Edge of data, right","Beginning of row":"Beginning of row","Beginning of sheet":"Beginning of sheet","Last cell in use":"Last cell in use","End mode":"End mode","One screen down":"One screen down","One screen up":"One screen up","One screen right":"One screen right","One screen left":"One screen left","Scroll to the active cell":"Scroll to the active cell","Save As":"Save As","New workbook":"New workbook","Full screen":"Full screen","Keyboard shortcuts":"Keyboard shortcuts","Minimize or maximize the ribbon":"Minimize or maximize the ribbon","Next area of the window":"Next area of the window","Previous area of the window":"Previous area of the window","Repeat or redo":"Repeat or redo","Paste Special":"Paste Special","Clear selection":"Clear selection","Insert Options":"Insert Options","Format Same As Above":"Format Same As Above","Format Same As Below":"Format Same As Below","Format Same As Left":"Format Same As Left","Format Same As Right":"Format Same As Right","Clear Formatting":"Clear Formatting","Quick Analysis":"Quick Analysis","Color Scale":"Color Scale","Find the next match":"Find the next match","Insert a chart sheet":"Insert a chart sheet","Select the cells with notes":"Select the cells with notes","Paste values":"Paste values","Clear the active cell and edit it":"Clear the active cell and edit it","Fill down":"Fill down","Fill right":"Fill right","Insert cells":"Insert cells","Delete cells":"Delete cells","Edit the active cell":"Edit the active cell","Next cell in the selection, down":"Next cell in the selection, down","Next cell in the selection, right":"Next cell in the selection, right","Enter the date":"Enter the date","Enter the time":"Enter the time","Copy the value from the cell above":"Copy the value from the cell above","Copy the formula from the cell above":"Copy the formula from the cell above","Show values or formulas":"Show values or formulas",AutoSum:"AutoSum","Open the drop-down list":"Open the drop-down list","This picture can't be pasted.":"This picture can't be pasted.","Pick From Drop-down List…":"Pick From Drop-down List…","The column has no text entries next to this cell to pick from.":"The column has no text entries next to this cell to pick from.","Flash Fill":"Flash Fill","Check spelling":"Check spelling","Calculate all":"Calculate all","Calculate the sheet":"Calculate the sheet","Check dependent formulas and calculate all":"Check dependent formulas and calculate all","Go To":"Go To","Formula Builder":"Formula Builder","Define Name":"Define Name","Create Names":"Create Names","Insert hyperlink":"Insert hyperlink","Insert or edit a note":"Insert or edit a note","Insert or reply to a threaded comment":"Insert or reply to a threaded comment","Show the context menu":"Show the context menu",Scripts:"Scripts","Create table":"Create table","Insert a sheet":"Insert a sheet","Insert a chart":"Insert a chart","Get Data":"Get Data","Draw tab":"Draw tab","Add or remove a filter":"Add or remove a filter","Show or hide outline symbols":"Show or hide outline symbols","Show every outline level":"Show every outline level",Bold:"Bold",Italic:"Italic",Underline:"Underline",Strikethrough:"Strikethrough","Increase font size":"Increase font size","Decrease font size":"Decrease font size","Align center":"Align center","Align left":"Align left","Modify Cell Style":"Modify Cell Style","General format":"General format","Currency format":"Currency format","Percentage format":"Percentage format","Exponential format":"Exponential format","Date format":"Date format","Time format":"Time format","Number format":"Number format","Outline border":"Outline border","Right border":"Right border","Left border":"Left border","Top border":"Top border","Bottom border":"Bottom border","Remove borders":"Remove borders","Hide columns":"Hide columns","Unhide columns":"Unhide columns","Hide rows":"Hide rows","Unhide rows":"Unhide rows","Select the region or the sheet":"Select the region or the sheet","Select the whole sheet":"Select the whole sheet","Select the column":"Select the column","Select the row":"Select the row","Only the active cell":"Only the active cell","Next corner of the selection":"Next corner of the selection","Extend selection":"Extend selection","Add to selection":"Add to selection","Select only visible cells":"Select only visible cells","Select the current region":"Select the current region","Select the current array":"Select the current array","Row differences":"Row differences","Column differences":"Column differences","Direct precedents":"Direct precedents","All precedents":"All precedents","Direct dependents":"Direct dependents","All dependents":"All dependents","Go To Special":"Go To Special","Hide or show objects":"Hide or show objects","Expand or collapse the formula bar":"Expand or collapse the formula bar","Formula tooltips on or off":"Formula tooltips on or off","Status bar":"Status bar","Frequently used":"Frequently used","Windows and dialogs":"Windows and dialogs","Move and scroll":"Move and scroll","Enter data":"Enter data","Cells and formula bar":"Cells and formula bar","Format and edit":"Format and edit","Select cells, columns or rows":"Select cells, columns or rows","Work with a selection":"Work with a selection",Charts:"Charts","Sort and filter":"Sort and filter",Outline:"Outline","Function keys":"Function keys",Drawing:"Drawing","Close window":"Close window","The browser closes the tab; a page cannot take these keys.":"The browser closes the tab; a page cannot take these keys.","Quit Excel":"Quit Excel","macOS quits the browser.":"macOS quits the browser.","Bound, but a browser tab keeps Cmd+N, Cmd+T and Cmd+Shift+P for itself; they reach the app only when it runs installed. File > New works everywhere.":"Bound, but a browser tab keeps Cmd+N, Cmd+T and Cmd+Shift+P for itself; they reach the app only when it runs installed. File > New works everywhere.","Create table or toggle reference":"Create table or toggle reference","Bound; in a browser tab Cmd+T opens a tab. Use Ctrl+T, or F4 for references.":"Bound; in a browser tab Cmd+T opens a tab. Use Ctrl+T, or F4 for references.","Switch app, hide, screenshot":"Switch app, hide, screenshot","macOS keeps these.":"macOS keeps these.","Minimize, maximize window":"Minimize, maximize window","A page has no control over its window.":"A page has no control over its window.","Special characters":"Special characters","macOS opens its character picker, which types into the cell as usual.":"macOS opens its character picker, which types into the cell as usual.",Thesaurus:"Thesaurus","Smart Lookup":"Smart Lookup","This online service is not in the app.":"This online service is not in the app.","Excel 4.0 macro sheet":"Excel 4.0 macro sheet","Not in the app; Opt+F11 and Opt+F8 open Scripts instead of Visual Basic.":"Not in the app; Opt+F11 and Opt+F8 open Scripts instead of Visual Basic.","New chart sheet":"New chart sheet","Chart sheets are not in the app; F11 inserts a chart on the sheet.":"Chart sheets are not in the app; F11 inserts a chart on the sheet.",Copilot:"Copilot","Copilot is not in the app.":"Copilot is not in the app.","Object button menu":"Object button menu","Paste offers its options on the Home tab.":"Paste offers its options on the Home tab.","Keyboard Shortcuts":"Keyboard Shortcuts","Find a command or key":"Find a command or key","Filter shortcuts":"Filter shortcuts",Yours:"Yours","Back to the default":"Back to the default","This key does nothing here until reset":"This key does nothing here until reset",Command:"Command","Press keys":"Press keys","New shortcut":"New shortcut",Assign:"Assign",Keys:"Keys","heading|Group":"Group",Horizontal:"Horizontal",Vertical:"Vertical","Diagonal up":"Diagonal up","Diagonal down":"Diagonal down","From corner":"From corner","From center":"From center",Sample:"Sample","Fill Effects":"Fill Effects","Color 1:":"Color 1:","Color 2:":"Color 2:","Shading styles:":"Shading styles:","Variants:":"Variants:","Text shown in an empty cell":"Text shown in an empty cell",Always:"Always","When the cell is empty or active":"When the cell is empty or active","Only when empty":"Only when empty","Top left":"Top left","Top center":"Top center","Top right":"Top right","Bottom left":"Bottom left","Bottom center":"Bottom center","Bottom right":"Bottom right","Left center":"Left center","Right center":"Right center","Cell Padding and Label":"Cell Padding and Label","Padding, in points":"Padding, in points",Top:"Top",Right:"Right",Bottom:"Bottom",Left:"Left",Center:"Center","Watermark or label":"Watermark or label","Keep it visible as a label":"Keep it visible as a label","Show:":"Show:","Position:":"Position:","Color:":"Color:","Size:":"Size:","Margin:":"Margin:","Cell Decoration":"Cell Decoration","Corner fold":"Corner fold","Corner:":"Corner:",Icon:"Icon","Add icon:":"Add icon:","Side:":"Side:","Remove icons":"Remove icons",Stretch:"Stretch","layout|Center":"Center","layout|Zoom":"Zoom","Cell Background Image":"Cell Background Image","Picture:":"Picture:","Layout:":"Layout:","Remove the picture":"Remove the picture","Selected cells":"Selected cells","This row":"This row","This column":"This column","This sheet":"This sheet",Tag:"Tag","Cell Tag":"Cell Tag","A note for formulas and scripts. It is not shown in the cell.":"A note for formulas and scripts. It is not shown in the cell.","Apply to:":"Apply to:","Input Mask":"Input Mask","Pattern:":"Pattern:","Try typing here":"Try typing here","Stores: {value}":"Stores: {value}","a letter, 0 digit, # any, > upper, < lower, [a-f] set, (am|pm) choice, \\x fixed x, {n,m} length; dates: yyyy MM dd HH mm ss tt; = takes the pattern from a formula.":"a letter, 0 digit, # any, > upper, < lower, [a-f] set, (am|pm) choice, \\x fixed x, {n,m} length; dates: yyyy MM dd HH mm ss tt; = takes the pattern from a formula.","Placeholder:":"Placeholder:","Store without fixed characters":"Store without fixed characters","Store without placeholders":"Store without placeholders","Sample:":"Sample:","That pattern has no place to type.":"That pattern has no place to type.","Select a cell with a picture in it first. Use Insert > Pictures > Place in Cell.":"Select a cell with a picture in it first. Use Insert > Pictures > Place in Cell.","Describes the picture; sort and filter use it":"Describes the picture; sort and filter use it","Picture in Cell":"Picture in Cell","Alt text:":"Alt text:","Size, in points; 0 fits the cell":"Size, in points; 0 fits the cell","Crop, in the picture's pixels; 0 keeps all of it":"Crop, in the picture's pixels; 0 keeps all of it","Horizontal:":"Horizontal:","Vertical:":"Vertical:","Excel has no size or crop for a picture in a cell, and fits it there.":"Excel has no size or crop for a picture in a cell, and fits it there.","Place over Cells":"Place over Cells","Down columns":"Down columns","Across rows":"Across rows",Both:"Both","Free: equal neighbors merge":"Free: equal neighbors merge","Restricted: only where the columns to the left also merge":"Restricted: only where the columns to the left also merge","Selecting a cell selects that cell":"Selecting a cell selects that cell","Selecting a cell selects the merged area":"Selecting a cell selects the merged area","Auto Merge":"Auto Merge","Equal neighbors show as one cell. The data stays as it is.":"Equal neighbors show as one cell. The data stays as it is.","Direction:":"Direction:","Mode:":"Mode:","Selection:":"Selection:","Column Width":"Column Width","Row Height":"Row Height","Column width:":"Column width:","Row height:":"Row height:","Also * or 2* for a share of the free space, or auto to follow the content.":"Also * or 2* for a share of the free space, or auto to follow the content.","Freeze Last Rows and Columns":"Freeze Last Rows and Columns","Last rows of the data:":"Last rows of the data:","Last columns of the data:":"Last columns of the data:","Keep them at the edge of the window":"Keep them at the edge of the window","Excel has no such panes: in Excel these rows and columns scroll with the sheet.":"Excel has no such panes: in Excel these rows and columns scroll with the sheet.","(empty)":"(empty)","No changes.":"No changes.","Tracking is off.":"Tracking is off.","Changed Cells":"Changed Cells","Keep track of changed cells on this sheet":"Keep track of changed cells on this sheet","Padding and Label…":"Padding and Label…","Corner Fold and Icons…":"Corner Fold and Icons…","Background Image…":"Background Image…","Input Mask…":"Input Mask…","Cell Tag…":"Cell Tag…","Picture in Cell…":"Picture in Cell…","Ellipsis for Long Text":"Ellipsis for Long Text","Tip for Cut Text":"Tip for Cut Text",Overline:"Overline","Single Accounting Underline":"Single Accounting Underline","Double Accounting Underline":"Double Accounting Underline","IME: Automatic":"IME: Automatic","IME: On":"IME: On","IME: Off":"IME: Off","IME: Disabled":"IME: Disabled","Auto Merge…":"Auto Merge…","Drag the Selection to Merge":"Drag the Selection to Merge","Changed Cells…":"Changed Cells…",Split:"Split","Freeze Last Rows and Columns…":"Freeze Last Rows and Columns…","Column Size…":"Column Size…","Row Size…":"Row Size…","Split Resize":"Split Resize","Drag Column and Row Headers to Move":"Drag Column and Row Headers to Move","Drag Column Headers to Move":"Drag Column Headers to Move","Drag Row Headers to Move":"Drag Row Headers to Move","Place over Cells…":"Place over Cells…","Place in Cell…":"Place in Cell…","Place over Cells from URL…":"Place over Cells from URL…","Place in Cell from URL…":"Place in Cell from URL…","Picture from URL":"Picture from URL","Downloading the picture…":"Downloading the picture…","Scroll up one row":"Scroll up one row","Scroll down one row":"Scroll down one row","Scroll left one column":"Scroll left one column","Scroll right one column":"Scroll right one column",Black:"Black","Dark Gray":"Dark Gray",Gray:"Gray",Red:"Red",Green:"Green",Blue:"Blue",Teal:"Teal",Purple:"Purple",Orange:"Orange","In this sheet":"In this sheet","Sheet tabs":"Sheet tabs","Horizontal scroll bar":"Horizontal scroll bar","Vertical scroll bar":"Vertical scroll bar",Headings:"Headings",Gridlines:"Gridlines","Outline symbols":"Outline symbols","Zero values":"Zero values","Gridline color:":"Gridline color:","Horizontal gridlines":"Horizontal gridlines","Vertical gridlines":"Vertical gridlines",Scrolling:"Scrolling","Scroll bars:":"Scroll bars:","As on macOS":"As on macOS","Always visible, with arrows":"Always visible, with arrows",Thin:"Thin","Scroll Bars and Border…":"Scroll Bars and Border…","Scroll by whole rows and columns":"Scroll by whole rows and columns","Scroll bars span the whole sheet":"Scroll bars span the whole sheet","End scrolling at the last used cell":"End scrolling at the last used cell","Wheel speed:":"Wheel speed:","Tab strip":"Tab strip","New sheet button":"New sheet button","Navigation arrows":"Navigation arrows","Sheets can be reordered":"Sheets can be reordered","Sheets can be renamed":"Sheets can be renamed","All sheets button:":"All sheets button:","When needed":"When needed",Never:"Never","View Options":"View Options","Use {name}":"Use {name}","Border around the workbook":"Border around the workbook","Border style":"Border style","line|Solid":"Solid","line|Dashed":"Dashed","line|Dotted":"Dotted","line|Double":"Double","Border width":"Border width","Border color":"Border color","Scroll Bars and Border":"Scroll Bars and Border","Scroll bars":"Scroll bars","Style:":"Style:","Thumb color":"Thumb color","Track color":"Track color",Selection:"Selection","Fill color":"Fill color","Show a border":"Show a border","Width:":"Width:",Strength:"Strength","Focus Cell":"Focus Cell","Highlight the row and column of the active cell":"Highlight the row and column of the active cell","Row color:":"Row color:","Column color:":"Column color:","Strength:":"Strength:","Editing Options":"Editing Options","After pressing Return, move:":"After pressing Return, move:","dir|Down":"Down","dir|Right":"Right","dir|Up":"Up","dir|Left":"Left","Don't move":"Don't move","Fixed decimal places:":"Fixed decimal places:","Cmd over a selected cell takes it out of the selection":"Cmd over a selected cell takes it out of the selection","Cmd and the arrow keys take cells out of the selection":"Cmd and the arrow keys take cells out of the selection","Zoom with Cmd and the wheel":"Zoom with Cmd and the wheel","Keep undo history":"Keep undo history","Context menus":"Context menus",Tips:"Tips","Size while resizing":"Size while resizing","Row or column while scrolling":"Row or column while scrolling","Value while filling":"Value while filling","Place while dragging cells":"Place while dragging cells","An outline can have up to eight levels.":"An outline can have up to eight levels.","Cannot ungroup that selection.":"Cannot ungroup that selection.","There is no detail to show or hide here.":"There is no detail to show or hide here.","Auto Outline":"Auto Outline","Cannot create an outline.":"Cannot create an outline.","There is no outline here to style.":"There is no outline here to style.","outline|Direction":"Direction","Summary rows below detail":"Summary rows below detail","Summary columns to right of detail":"Summary columns to right of detail","Automatic styles":"Automatic styles",Create:"Create","Apply Styles":"Apply Styles","Choose…":"Choose…","Line width":"Line width","Outline area":"Outline area",Buttons:"Buttons","Numbers and + -":"Numbers and + -","Lines and button borders":"Lines and button borders",Dots:"Dots","Picture for +":"Picture for +","Picture for -":"Picture for -","Outline Symbols":"Outline Symbols","Default Look":"Default Look","No limit":"No limit","Deepest level":"Deepest level","Picture for level {level}":"Picture for level {level}","Column:":"Column:","Show expand and collapse marks":"Show expand and collapse marks","Show check boxes":"Show check boxes","Deepest level:":"Deepest level:","Expanded mark":"Expanded mark","Collapsed mark":"Collapsed mark","Each cell's indent sets its level in the tree. Increase Indent on the Home tab changes it.":"Each cell's indent sets its level in the tree. Increase Indent on the Home tab changes it.","Outline Column":"Outline Column","Level {level}":"Level {level}","Show All Levels":"Show All Levels","Show Detail":"Show Detail","Hide Detail":"Hide Detail","Show Outline Symbols":"Show Outline Symbols","Hide Outline Symbols":"Hide Outline Symbols","Settings…":"Settings…","Outline Symbols…":"Outline Symbols…","Outline Column…":"Outline Column…",Subject:"Subject",Author:"Author",Manager:"Manager",Company:"Company",Category:"Category",Keywords:"Keywords","Hyperlink base":"Hyperlink base","Yes or no":"Yes or no","Property name":"Property name","Yes or No":"Yes or No","Give the property a name.":"Give the property a name.","That value doesn't suit the type {type}.":"That value doesn't suit the type {type}.","Value:":"Value:","Add or Modify":"Add or Modify",Summary:"Summary",Statistics:"Statistics",Content:"Content",Custom:"Custom","Excel Workbook (.xlsx)":"Excel Workbook (.xlsx)","Location:":"Location:","{kb} KB ({bytes} bytes)":{one:"{kb} KB ({bytes} byte)",other:"{kb} KB ({bytes} bytes)"},"Not saved yet":"Not saved yet","Created:":"Created:","Modified:":"Modified:","Sheets:":"Sheets:","Attributes:":"Attributes:","Read-only":"Read-only",Editable:"Editable","attr|Hidden":"Hidden",Created:"Created",Modified:"Modified",Printed:"Printed","Last saved by":"Last saved by",Revision:"Revision","Total editing time":"Total editing time","{count} minutes":{one:"{count} minute",other:"{count} minutes"},Application:"Application",Version:"Version",Worksheets:"Worksheets","{name} (hidden)":"{name} (hidden)","{name} Properties":"{name} Properties","First sheet":"First sheet","Scroll tabs left":"Scroll tabs left","Scroll tabs right":"Scroll tabs right","Last sheet":"Last sheet","All sheets":"All sheets","A workbook must contain at least one visible sheet.":"A workbook must contain at least one visible sheet.",'Delete "{name}"? This can\'t be undone.':`Delete "{name}"? This can't be undone.`,"Delete these {count} sheets? This can't be undone.":{one:"Delete this {count} sheet? This can't be undone.",other:"Delete these {count} sheets? This can't be undone."},"Hidden sheets":"Hidden sheets","Unhide one or more sheets:":"Unhide one or more sheets:","Before sheet":"Before sheet","(move to end)":"(move to end)","To book":"To book","Move or Copy":"Move or Copy","To book:":"To book:","Before sheet:":"Before sheet:","Create a copy":"Create a copy","Sheet name":"Sheet name","A sheet name has 1 to 31 characters, none of \\ / ? * [ ] :, and doesn't begin or end with an apostrophe.":"A sheet name has 1 to 31 characters, none of \\ / ? * [ ] :, and doesn't begin or end with an apostrophe.","That name is already taken. Try a different one.":"That name is already taken. Try a different one.","History is a reserved name. Try a different one.":"History is a reserved name. Try a different one.","Insert Sheet":"Insert Sheet","Delete Sheets":"Delete Sheets","Move or Copy…":"Move or Copy…",Duplicate:"Duplicate","Unprotect Sheet…":"Unprotect Sheet…","Protect Sheet…":"Protect Sheet…","Tab Color":"Tab Color","Hide Sheets":"Hide Sheets","Unhide…":"Unhide…","Select All Sheets":"Select All Sheets","Ungroup Sheets":"Ungroup Sheets","Drag to share the width between tabs and scroll bar":"Drag to share the width between tabs and scroll bar","Paste Options":"Paste Options","Keep Source Formatting":"Keep Source Formatting","Formulas & Number Formatting":"Formulas & Number Formatting","No Borders":"No Borders","Keep Source Column Widths":"Keep Source Column Widths",Transpose:"Transpose","Merge Conditional Formatting":"Merge Conditional Formatting","Values & Number Formatting":"Values & Number Formatting","Values & Source Formatting":"Values & Source Formatting",Formatting:"Formatting","Paste Link":"Paste Link","Linked Picture":"Linked Picture","Copy cells in this workbook first, then use Paste Special.":"Copy cells in this workbook first, then use Paste Special.","Paste Special…":"Paste Special…","paste|All":"All","All except borders":"All except borders","Column widths":"Column widths","Formulas and number formats":"Formulas and number formats",Formats:"Formats","Values and number formats":"Values and number formats","Notes and comments":"Notes and comments","All merging conditional formats":"All merging conditional formats",Validation:"Validation",Subtract:"Subtract",Multiply:"Multiply",Divide:"Divide","Paste Special works on copied cells, not on cut ones. Use Paste, or copy the cells instead.":"Paste Special works on copied cells, not on cut ones. Use Paste, or copy the cells instead.","Skip blanks":"Skip blanks","Skip hidden rows and columns":"Skip hidden rows and columns",Operation:"Operation","Text to display":"Text to display","ScreenTip…":"ScreenTip…",ScreenTip:"ScreenTip","ScreenTip text:":"ScreenTip text:",Address:"Address","Cell reference":"Cell reference","Email address":"Email address","File to link to":"File to link to","file|Select…":"Select…","Web Page or File":"Web Page or File","This Document":"This Document","Email Address":"Email Address","Link to an existing file or web page.":"Link to an existing file or web page.","Link to a place in this document.":"Link to a place in this document.","Link to an email address.":"Link to an email address.","Address:":"Address:","Cell reference:":"Cell reference:","Sheet:":"Sheet:","Email address:":"Email address:","Subject:":"Subject:","Remove Link":"Remove Link","Enter an address.":"Enter an address.","Enter a cell reference.":"Enter a cell reference.","Enter an email address.":"Enter an email address.","Edit Hyperlink":"Edit Hyperlink","Insert Hyperlink":"Insert Hyperlink","Text to Display:":"Text to Display:","Reference isn't valid: {ref}":"Reference isn't valid: {ref}","This link points to {target}, which a web page can't open.":"This link points to {target}, which a web page can't open.","{where} - Click once to follow. Click and hold to select this cell.":"{where} - Click once to follow. Click and hold to select this cell.","Across Worksheets…":"Across Worksheets…","Series…":"Series…",Justify:"Justify","Custom Lists…":"Custom Lists…","Editing Options…":"Editing Options…",Trend:"Trend","Series in:":"Series in:","series|Linear":"Linear",Growth:"Growth",AutoFill:"AutoFill","Date unit:":"Date unit:",Day:"Day",Weekday:"Weekday",Month:"Month",Year:"Year","Step value":"Step value","Stop value":"Stop value","Step value:":"Step value:","Stop value:":"Stop value:","fill|Series":"Series","This workbook has no other sheet to fill.":"This workbook has no other sheet to fill.","fill|Fill":"Fill",Contents:"Contents","Fill Across Sheets":"Fill Across Sheets","Cells that hold numbers or formulas can't be justified.":"Cells that hold numbers or formulas can't be justified.","Text will extend below selected range.":"Text will extend below selected range.","To do this, all the merged cells need to be the same size.":"To do this, all the merged cells need to be the same size.","You can't change part of an array.":"You can't change part of an array.","Auto Fill Options":"Auto Fill Options","Copy Cells":"Copy Cells","Fill Series":"Fill Series","Fill Formatting Only":"Fill Formatting Only","Fill Without Formatting":"Fill Without Formatting","Fill Days":"Fill Days","Fill Weekdays":"Fill Weekdays","Fill Months":"Fill Months","Fill Years":"Fill Years","Width: {count} pixels":{one:"Width: {count} pixel",other:"Width: {count} pixels"},"Height: {count} pixels":{one:"Height: {count} pixel",other:"Height: {count} pixels"},"Row: {row}":"Row: {row}","Column: {col}":"Column: {col}","The information can't be pasted because the Copy area and the paste area aren't the same size and shape.":"The information can't be pasted because the Copy area and the paste area aren't the same size and shape.","The information can't be pasted because the Cut area and the paste area aren't the same size and shape.":"The information can't be pasted because the Cut area and the paste area aren't the same size and shape.","We can't do that to a merged cell.":"We can't do that to a merged cell.","This action won't work on multiple selections.":"This action won't work on multiple selections.","You can't change part of a data table.":"You can't change part of a data table.","The information can't be pasted because it would run off the end of the sheet.":"The information can't be pasted because it would run off the end of the sheet.","There are no visible cells to paste.":"There are no visible cells to paste.","The copied cells are no longer there.":"The copied cells are no longer there.","Cannot change this part of a PivotTable report.":"Cannot change this part of a PivotTable report.","This operation is not allowed. The operation is attempting to shift cells in a table on your worksheet.":"This operation is not allowed. The operation is attempting to shift cells in a table on your worksheet.","To prevent possible loss of data, cells can't be shifted off the end of the sheet.":"To prevent possible loss of data, cells can't be shifted off the end of the sheet.","Shift cells right":"Shift cells right","Shift cells down":"Shift cells down","Shift cells left":"Shift cells left","Shift cells up":"Shift cells up","Entire row":"Entire row","Entire column":"Entire column","Insert Cut Cells…":"Insert Cut Cells…","Insert Copied Cells…":"Insert Copied Cells…","Insert Cut Cells":"Insert Cut Cells","Insert Copied Cells":"Insert Copied Cells","The command can't be used on overlapping selections.":"The command can't be used on overlapping selections.","There's already data here. Do you want to replace it?":"There's already data here. Do you want to replace it?",Subtotal:"Subtotal",StdDevp:"StdDevp",Varp:"Varp","Select a cell inside a list with a header row first.":"Select a cell inside a list with a header row first.","Column {col}":"Column {col}","At each change in":"At each change in","Use function":"Use function","At each change in:":"At each change in:","Use function:":"Use function:","Add subtotal to:":"Add subtotal to:","Replace current subtotals":"Replace current subtotals","Page break between groups":"Page break between groups","Summary below data":"Summary below data","Remove All":"Remove All","Choose at least one column to add a subtotal to.":"Choose at least one column to add a subtotal to.",List:"List","List:":"List:","Bullet •":"Bullet •","Circle ◦":"Circle ◦","Square ▪":"Square ▪",Superscript:"Superscript",Subscript:"Subscript",Outdent:"Outdent","list|Indent":"Indent","Rich Text":"Rich Text","Note on {ref}":"Note on {ref}","Font size":"Font size",Alignment:"Alignment","align|Left":"Left","align|Center":"Center","align|Right":"Right","Format Note":"Format Note","Fill color:":"Fill color:","Text color:":"Text color:","Font size:":"Font size:","Alignment:":"Alignment:","Border color:":"Border color:","Border style:":"Border style:","Border width:":"Border width:","Always show this note":"Always show this note","Move with cells":"Move with cells","Size with cells":"Size with cells",Locked:"Locked","Lock text":"Lock text",Typing:"Typing","undo|Fill":"Fill",Borders:"Borders","Merge Cells":"Merge Cells","Insert or Delete":"Insert or Delete","Insert or Delete Cells":"Insert or Delete Cells","Move Cells":"Move Cells","Cell Style":"Cell Style",Action:"Action","Nothing to undo.":"Nothing to undo.","Nothing to redo.":"Nothing to redo.","Undo {count} actions":{one:"Undo {count} Action",other:"Undo {count} Actions"},"Redo {count} actions":{one:"Redo {count} Action",other:"Redo {count} Actions"},"Undo list":"Undo list","Redo list":"Redo list","Expand or collapse the formula bar (⌃⇧U)":"Expand or collapse the formula bar (⌃⇧U)","Copy takes headers":"Copy takes headers","Copy takes headers:":"Copy takes headers:","Row headers":"Row headers","Column headers":"Column headers",Overflow:"Overflow","Text overflows into empty cells on this sheet":"Text overflows into empty cells on this sheet","Allow editing directly in cells":"Allow editing directly in cells","Start editing as soon as a cell is selected":"Start editing as soon as a cell is selected","Select all the text when editing starts":"Select all the text when editing starts","Enable automatic percent entry":"Enable automatic percent entry","Enable AutoComplete for cell values":"Enable AutoComplete for cell values","Let numbers too wide for a column spill into empty cells (not in Excel)":"Let numbers too wide for a column spill into empty cells (not in Excel)","Enable fill handle and cell drag-and-drop":"Enable fill handle and cell drag-and-drop","Alert before overwriting cells":"Alert before overwriting cells","Show Paste Options button after content is pasted":"Show Paste Options button after content is pasted","Show Auto Fill Options button after a fill":"Show Auto Fill Options button after a fill","Paste skips hidden rows and columns":"Paste skips hidden rows and columns","Dragging whole table rows shifts cells instead of overwriting":"Dragging whole table rows shifts cells instead of overwriting","Header Text…":"Header Text…","Header Rows…":"Header Rows…","Header Columns…":"Header Columns…","Header Rows":"Header Rows","Header Columns":"Header Columns","How many:":"How many:","Merge Header Cells":"Merge Header Cells","Unmerge Header Cells":"Unmerge Header Cells","Default value":"Default value","For the selected cells. A formula starts with =.":"For the selected cells. A formula starts with =.","For the selection from {ref}. A formula starts with =.":"For the selection from {ref}. A formula starts with =.","Show this while the cell is empty:":"Show this while the cell is empty:","Default Value":"Default Value","That formula has a problem.":"That formula has a problem.","Custom lists":"Custom lists","List entries":"List entries","Import list from cells":"Import list from cells","NEW LIST":"NEW LIST",Update:"Update",Import:"Import","Custom lists:":"Custom lists:","List entries:":"List entries:","Import list from cells:":"Import list from cells:","Custom Lists":"Custom Lists","Links can't be created to source areas on the destination sheet.":"Links can't be created to source areas on the destination sheet.","Standard Width":"Standard Width","Standard column width:":"Standard column width:","Row Height…":"Row Height…","AutoFit Row Height":"AutoFit Row Height","Column Width…":"Column Width…","AutoFit Selection":"AutoFit Selection","Standard Width…":"Standard Width…","Hide & Unhide":"Hide & Unhide","Hide Rows":"Hide Rows","Hide Columns":"Hide Columns","Unhide Rows":"Unhide Rows","Unhide Columns":"Unhide Columns","Header Color…":"Header Color…",AutoCorrect:"AutoCorrect","Correct TWo INitial CApitals":"Correct TWo INitial CApitals","Capitalize names of days":"Capitalize names of days","Correct accidental use of cAPS LOCK key":"Correct accidental use of cAPS LOCK key","Replace text as you type":"Replace text as you type",With:"With",Replacements:"Replacements","Replace:":"Replace:","With:":"With:","Reply to Comment":"Reply to Comment","Delete Comment":"Delete Comment","New Comment":"New Comment","Edit Note":"Edit Note","New Note":"New Note","Delete Note":"Delete Note","Hide Note":"Hide Note","Show Note":"Show Note","Format Note…":"Format Note…","Show All Notes":"Show All Notes","Hide All Notes":"Hide All Notes","Define Name…":"Define Name…","Link…":"Link…","This value doesn't match the data validation rules for this cell.":"This value doesn't match the data validation rules for this cell.","Continue?":"Continue?",Retry:"Retry","Invalid value":"Invalid value","Check this value":"Check this value","Custom zoom percent":"Custom zoom percent","Custom:":"Custom:","Zoom to:":"Zoom to:","Fit selection":"Fit selection","Defined {name} as {refers}":"Defined {name} as {refers}",'"{text}" is not a valid reference or name':'"{text}" is not a valid reference or name','"{name}" is hidden':'"{name}" is hidden',"Names and tables":"Names and tables","No names defined":"No names defined","Drag to resize the name box":"Drag to resize the name box","Panes can't be split while they're frozen. Unfreeze them first.":"Panes can't be split while they're frozen. Unfreeze them first.","Keep typing to narrow the list.":"Keep typing to narrow the list.","This data type has no fields stored in the file.":"This data type has no fields stored in the file.","Values saved in the file. Data types don't refresh in this app.":"Values saved in the file. Data types don't refresh in this app.","Merging cells keeps only the first value and discards the other values.":"Merging cells keeps only the first value and discards the other values.","Insert {count} Columns Left":{one:"Insert {count} Column Left",other:"Insert {count} Columns Left"},"Insert {count} Columns Right":{one:"Insert {count} Column Right",other:"Insert {count} Columns Right"},"Insert {count} Rows Above":{one:"Insert {count} Row Above",other:"Insert {count} Rows Above"},"Insert {count} Rows Below":{one:"Insert {count} Row Below",other:"Insert {count} Rows Below"},"{count} Rows Above":{one:"{count} Row Above",other:"{count} Rows Above"},"{count} Rows Below":{one:"{count} Row Below",other:"{count} Rows Below"},"{count} Columns Left":{one:"{count} Column Left",other:"{count} Columns Left"},"{count} Columns Right":{one:"{count} Column Right",other:"{count} Columns Right"},"Rows {label}":{one:"Row {label}",other:"Rows {label}"},"Columns {label}":{one:"Column {label}",other:"Columns {label}"},"Delete Rows {label}":{one:"Delete Row {label}",other:"Delete Rows {label}"},"Delete Columns {label}":{one:"Delete Column {label}",other:"Delete Columns {label}"},"Hide Rows {label}":{one:"Hide Row {label}",other:"Hide Rows {label}"},"Hide Columns {label}":{one:"Hide Column {label}",other:"Hide Columns {label}"},"The value must be between 0 and {max}.":"The value must be between 0 and {max}.","Number Stored as Text":"Number Stored as Text","Convert to Number":"Convert to Number","Ignore Error":"Ignore Error","Edit in Formula Bar":"Edit in Formula Bar","Error Checking Options…":"Error Checking Options…","Error Checking Options":"Error Checking Options","Enable background error checking":"Enable background error checking","Error checking rules":"Error checking rules","Numbers formatted as text or preceded by an apostrophe":"Numbers formatted as text or preceded by an apostrophe","Linear Trend":"Linear Trend","Growth Trend":"Growth Trend","Page breaks":"Page breaks","All using Source theme":"All using Source theme","(Showing All)":"(Showing All)","Filtered by date":"Filtered by date","Equals {values} or {count} more":"Equals {values} or {count} more",or:"or","Top {n} Items":"Top {n} Items","Top {n} Percent":"Top {n} Percent","Bottom {n} Items":"Bottom {n} Items","Bottom {n} Percent":"Bottom {n} Percent","Filtered by color":"Filtered by color","Filtered by icon":"Filtered by icon",Filtered:"Filtered"};export{e as default};
|