PageSourceSearch

https://exploremydata.com/assets/xlsx-Dwvuen5n.js

js exploremydata.com collected 2026-09-25 20:07:28 UTC 1,889 bytes, 2 lines download raw bytes

1import{utils as s,write as y}from"./vendor-xlsx-DCwg6k6L.js";import{s as g,e as w,d as x}from"./generic-hlUXJ1vY.js";import{stripExtension as S,formatCount as M,replaceExtension as _}from"./util-CkZ8KZK2.js";import"./vite-preload-ckwbz45p.js";const v="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";function E(e,t){const o=e.replace(/[[\]:*?/\\]/g," ").trim();return(o.length>0?o:t).slice(0,31)||"Sheet1"}function C(e){return e.columns.map((t,o)=>{let n=t.length;for(const r of e.rows){const a=String(r[o]??"");for(const c of a.split(`
2`))n=Math.max(n,c.length)}return{wch:Math.min(Math.max(n+2,8),60)}})}function b(e,t,o){if(e==="")return null;if(t==="date"&&o)return{t:"n",v:w(e),z:"yyyy-mm-dd"};const n=x(e,t==="date"?"string":t);return typeof n=="number"?{t:"n",v:n}:typeof n=="boolean"?{t:"b",v:n}:{t:"s",v:String(n??"")}}const A=async(e,t)=>{const o=t.options.dateCells!=="text",n=E((t.options.sheetName??"").trim(),e.name||S(t.filename)||"Sheet1"),r={},a=e.columns.length,c=e.rows.length+1;e.columns.forEach((i,m)=>{r[s.encode_cell({r:0,c:m})]={t:"s",v:i}}),e.rows.forEach((i,m)=>{for(let l=0;l<a;l+=1){const p=b(String(i[l]??""),e.kinds[l]??"string",o);p&&(r[s.encode_cell({r:m+1,c:l})]=p)}}),r["!ref"]=s.encode_range({s:{r:0,c:0},e:{r:Math.max(c-1,0),c:Math.max(a-1,0)}}),t.options.fitColumns!=="off"&&(r["!cols"]=C(e)),t.options.freezeHeader!=="off"&&(r["!freeze"]="A2"),t.options.autofilter==="on"&&(r["!autofilter"]={ref:s.encode_range({s:{r:0,c:0},e:{r:Math.max(c-1,0),c:Math.max(a-1,0)}})});const h=s.book_new();s.book_append_sheet(h,r,n);const d=y(h,{bookType:"xlsx",type:"array"}),f=e.kinds.filter(i=>i==="date").length,u=[...g(e),`sheet "${n}"`];return o&&f>0&&u.push(`${M(f)} date column${f===1?"":"s"} as real dates`),{filename:_(t.filename,"xlsx"),blob:new Blob([new Uint8Array(d)],{type:v}),summary:u}};export{E as safeSheetName,A as xlsxEmitter};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.