<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Le Nguyen</title>
    <description>The latest articles on DEV Community by Le Nguyen (@teiv2000).</description>
    <link>https://dev.to/teiv2000</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4239195%2F4630e3f6-f5fb-494b-b3c5-25b892b91281.jpg</url>
      <title>DEV Community: Le Nguyen</title>
      <link>https://dev.to/teiv2000</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/teiv2000"/>
    <language>en</language>
    <item>
      <title>I made a React component that opens and edits DOCX / XLSX / PPTX in the browser. 300k-row sheet in ~300ms, no server, MIT</title>
      <dc:creator>Le Nguyen</dc:creator>
      <pubDate>Wed, 11 Nov 2026 13:42:37 +0000</pubDate>
      <link>https://dev.to/teiv2000/i-made-a-react-component-that-opens-and-edits-docx-xlsx-pptx-in-the-browser-300k-row-sheet-in-488o</link>
      <guid>https://dev.to/teiv2000/i-made-a-react-component-that-opens-and-edits-docx-xlsx-pptx-in-the-browser-300k-row-sheet-in-488o</guid>
      <description>&lt;p&gt;&lt;em&gt;Why: I needed "customer uploads an XLSX, fix a few cells, save it back" inside a React app. OnlyOffice / Collabora mean running a document server in Docker and an iframe talking to it, and a big sheet still sits on a spinner while the server converts it. docx-preview / SheetJS + a grid are view-only or block the main thread on a 20 MB file. Nothing in between, so I built it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Usage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { DocViewer } from '@p10node/office-engine'

&amp;lt;DocViewer src={file} style={{ height: 600 }} /&amp;gt;
&amp;lt;DocViewer src="https://cdn.example.com/report.xlsx" /&amp;gt;
&amp;lt;DocViewer src={file} editable onSave={(blob, name) =&amp;gt; upload(blob, name)} /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;src takes File / Blob / ArrayBuffer / URL. CSS is auto-injected, the container just needs a height. There's also a useDocument hook if you want to render your own UI, a vanilla mount(), an  web component, and a single script build.&lt;/p&gt;

&lt;p&gt;What makes it not choke on big files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;ZIP read lazily, HTTP Range requests from a URL, so first rows show before the file finishes downloading&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Streaming XML parser in a Web Worker, main thread only gets rows / paragraphs / slides as they arrive&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Only visible pages, cells, slides are in the DOM&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Save patches the original file instead of re-exporting it, so anything the engine doesn't understand is kept byte for byte&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bundle (gzip): main ~93 KB, worker ~155 KB (loads off the main thread), collab +17 KB optional. The standalone script with React bundled is ~307 KB.&lt;/p&gt;

&lt;p&gt;Editing: DOCX text / styles / lists / images / tables, XLSX cells / formulas (134 functions) / formats / rows / columns / sheets, PPTX text / shapes / images / slides. Google Docs style toolbar. Optional real-time collab with cursors; that's the only part needing a backend (a small WebSocket hub, Bun script included).&lt;/p&gt;

&lt;p&gt;Not there yet: XLSX charts / pivots / conditional formatting editing, DOCX headers / footers read-only, no PPTX animations. It needs the DOM and a Worker, so in Next.js use a client component / dynamic import with ssr: false.&lt;/p&gt;

&lt;p&gt;Fair warning: it's a few days old and a lot of it was written with Claude Code, with me doing architecture, review and the bug hunting on real files. If you throw a file at it and it breaks, open an issue with the file, that's the fastest way it gets fixed.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/p10node/office-engine" rel="noopener noreferrer"&gt;https://github.com/p10node/office-engine&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Demo (drag your own file in): &lt;a href="https://p10node.github.io/office-engine/demo/" rel="noopener noreferrer"&gt;https://p10node.github.io/office-engine/demo/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmd4hny4g7n20nlyn97l9.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmd4hny4g7n20nlyn97l9.gif" alt="A demo of 300K rows loads" width="800" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>typescript</category>
      <category>github</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
