文件格式任意转换助手Transfer Any File

离线 · 无上传 · 浏览器本地完成Offline · no uploads · runs in the browser

Excel 转 PNG——离线、所有工作表一张长图、不上传Excel to PNG offline — every sheet, one tall image

要把一份工作簿「整个」发给别人看一眼,比截图省事的是这条:`xlsx>html` 先用 `cellDates: true` 与一份固定日期格式读取,再走 `normalizeDateCells`,最后由 `sheet_to_html` 把**每一个工作表各写成一张表**,多于一张时为每张前面加一个取代表名的小标题(`<h2>`);这份 HTML 统一过 DOMPurify 后套上自带的样式表。`html>png` 再把整篇文档离屏渲染成一张画布并无损编码——所以产物是**一张按工作表顺序堆起来的长图**,不是每张表一张图。三件由实现决定的事:一、**日期长什么样由那条格式说得出**:纯日期渲染成 `2024-01-05`,带时分秒的是 `2024-01-05 14:30:00`,工作簿作者自己指定的格式被尊重(`[h]:mm:ss` 那种时长仍是 `124:48:00`),而没有任何显示文本的日期格保持原样、不替它编一个;二、**像素密度按高度降档**——高度超过 2000 px 用 1.5 倍、超过 4000 px 用 1 倍,所以多 sheet 的长簿子落在一倍密度——一块 CSS 像素只对应一个设备像素,这不是排版变了,而是为了让画布留在浏览器上限内;三、**上限是明确失败**:整页高度超过 32768 px 报「渲染高度过大」,因为远超时浏览器交回的是空白画布,那种「成功但全白」比一条错误难查。要照实说的还有:单元格的文字是转义后写进表格的,所以格子里打的标记只会显示为字符,而单元格自带的链接会变成真正的链接;正文在读出时净化一次、渲染前再净化一次。图里的文字不能选中、搜索或朗读;表头那一行不带 `<th>` 语义,样式表的浅底只会按行序落。全程在这个标签页里完成,只有 storage 权限。When a workbook has to be shown to someone whole, this is shorter than screenshots: `xlsx>html` reads with `cellDates: true` and one fixed date format, runs `normalizeDateCells`, and lets `sheet_to_html` write **one table per worksheet**, prefixing each with an `<h2>` carrying the sheet name whenever there is more than one; that body passes DOMPurify once and is wrapped in the stylesheet this extension ships. `html>png` then renders the entire document offscreen into one canvas and encodes it losslessly — so the artifact is **one tall image stacked in worksheet order**, not a picture per sheet. Three things the implementation decides: first, **what a date looks like is sayable** — a plain date renders as `2024-01-05`, a real timestamp as `2024-01-05 14:30:00`, a format the workbook author chose is respected (`[h]:mm:ss` durations stay `124:48:00`), and a date cell with no display text is left alone rather than invented. Second, **density steps with height**: past 2000 px the ratio is 1.5×, past 4000 px it is 1×, so a long multi-sheet workbook lands on 1× — one device pixel per CSS pixel instead of two — which is the canvas staying inside the browser’s own limits, not a different layout. Third, **the ceiling fails out loud**: beyond 32768 px of rendered height the route reports “too tall to render”, because far past that a browser hands back a blank canvas, and a white “success” is harder to diagnose than an error. Also stated plainly: cell text is escaped into the table, so markup typed into a cell shows as characters, while a cell that carries a link becomes a real link; the body is sanitised once on the way out of the reader and again before rendering. Text in the picture cannot be selected, searched or read aloud, and the first row carries no `<th>` semantics, so the stylesheet’s tint falls by row order. All of it inside this tab on the storage permission.

一批转换结果卡片,含文件名、体积与下载入口
一次混合批量,一个 ZIP 下载One mixed batch, one ZIP download

这条链路怎么走How the route runs

Excel (.xlsx)Excel (.xlsx) HTMLHTML PNGPNG

共 2 步,由扩展的路径搜索自动选出,中间产物不落盘。2 steps, chosen by the extension's own path search; intermediate results never touch the disk.

会保留什么What carries over

  • 所有工作表进一张图:按簿内顺序堆叠,每张前面带一个取代表名的小标题Every worksheet in one image: stacked in workbook order, each preceded by a heading carrying its sheet name
  • 日期有确定的样子:纯日期是 `2024-01-05`,带时间是 `2024-01-05 14:30:00`,作者自定的格式不被覆盖Dates have a settled look: `2024-01-05` for a plain date, `2024-01-05 14:30:00` for a timestamp, and an author-chosen format is not overridden
  • 无损编码:像素之间不做第二次量化Lossless encoding: no second quantisation of the pixels
  • 排版由自带样式表给出:每格 1px 实线、表格占满 800 px 正文、偶数行浅底The layout is the bundled stylesheet: a 1px rule per cell, tables filling the 800 px measure, one tint on even rows

如实说明的限制What it does not do

  • 很长的簿子像素密度会降档(排版高度 >2000 px 用 1.5 倍、>4000 px 用 1 倍,即一块 CSS 像素对应的设备像素变少);要严格清晰请逐表转 HTML 或 PNG 分张Long documents drop density (1.5× past 2000 px of layout height, 1× past 4000 px), which is fewer device pixels per CSS pixel rather than a different layout; convert sheet by sheet to HTML or PNG to keep the full ratio
  • 整页高度上限 32768 px:超出报错而不是交付空白画布或被截短的图A 32768 px ceiling on rendered height: beyond it the route fails instead of delivering a blank canvas or a trimmed image
  • 一张图就是一张图:想要「一个工作表一个文件」,请走 Excel→PDF(一份多页文档)或逐表另存后再转One image is one image: for a file per worksheet take Excel to PDF (one multi-page document) or split the sheets first
  • 文字不可选中、搜索或朗读:PNG 没有文字层;图表、条件格式、批注与冻结窗格在这条链上没有对应物No text layer, so nothing to select, search or read aloud; charts, conditional formatting, comments and frozen panes have no counterpart on this route
  • 格子里打的标记会被转义成字符显示,只有单元格自带的链接变成真链接;正文净化两次(读出时与渲染前)Markup typed into a cell is escaped into characters; only a cell’s own link becomes a real anchor, and the body is sanitised twice — on the way out of the reader and again before rendering

实操提示Working with it

  • 要一份能打印归档的成品:Excel→PDF,一份多页文档;分页按排版高度切,不按工作表边界切For a printable, archivable document: Excel to PDF, one multi-page file whose breaks follow the laid-out height rather than the sheet bounds
  • 要严格清晰的一张表:先转到 HTML 再看需要截图,比在长图里降档更可控For one exactly-crisp table: convert to HTML first and shoot what you need, which stays more controllable than dropping density in a long image
  • 要继续加工数据:Excel→CSV / JSON / Markdown,那里交付的是值而不是画面To keep working on the data: Excel to CSV, JSON or Markdown, which deliver values rather than a picture

常见问题Questions people actually ask

三个工作表会得到几张图?Three worksheets — how many images?

一张:这条链把整篇文档一次捕获成一张画布,三张表按簿内顺序堆在同一条长图里,每张前面有一个取代表名的小标题。想要一份文档而不是一张大图,请走 Excel→PDF。One: the route captures the whole document into a single canvas, so all three tables stack into one tall image, each under a heading carrying its sheet name. For a document rather than one long picture, take Excel to PDF.

为什么图里的日期是 `2024-01-05`,不是我在 Excel 里看到的写法?Why does a date read 2024-01-05 rather than how Excel shows it?

这条链用一份固定的日期格式渲染,并把「日期格」的显示文本收进正文;工作簿作者明确指定的格式(比如 `[h]:mm:ss` 的时长)会被尊重而不是覆盖。所以本地设置或软件默认写法不保证复刻——要那个外观,请转成 HTML 后自己套样式。The route renders dates through one fixed format and folds each date cell’s display text into the body, while a format the workbook author chose explicitly is respected rather than overridden. So a regional setting or your software’s default is not guaranteed to be reproduced — for that look, convert to HTML and style it there.

很长的表转出来字很小,是我把图看小了吗?The long sheet looks tiny — am I just viewing it small?

多半不是:内容高度超过 2000 px 时像素密度降到 1.5 倍、超过 4000 px 降到 1 倍,这是为了让画布留在浏览器上限内的取舍。所以长簿子每一行拿到的设备像素更少。要严格清晰,请逐张表分开转,或走逐表分开的路(先转 HTML 再决定),因为密度档只对「以 PDF 为输入」的转换开放,而 Excel→PDF 那一步根本不读它(只有把 PDF 转成图的那一步用得上)。Most likely not: past 2000 px of content height the ratio steps to 1.5× and past 4000 px to 1×, a trade made to keep the canvas inside the browser’s limits, so a long workbook carries fewer pixels per row than a short one. For exact crispness convert one sheet at a time, or split the sheets, since the density dial is offered only for conversions taking a PDF as input, and Excel to PDF never reads it — the only step that uses it is the one rasterising a PDF.

不需要账号,也不需要联网:装好扩展后点图标,在新标签页里打开工作台,文件从磁盘直接选。No account and no network: install the extension, click its icon, and the workbench opens in a new tab reading straight off your disk.