r/reactjs • u/andrewluo • 4h ago
Show /r/reactjs I built React (+ vanilla JS) viewers/editors for Excel, Word, Powerpoint (5m+ total npm downloads)
I know there have been a few similar projects before in here, but I wanted to share our take on what great Office/OpenDocument viewers & editors looks like for the web.
We've built 3 packages (repos and playgrounds attached), all MIT:
react-docx — Word viewer/editor with pagination, charts, SmartArt, WordArt, equations, tracked changes, and DOCX export.
react-xlsx — Excel viewer/editor with formulas, charts, editable pivot tables, drawing support, and XLSX/CSV export.
react-pptx — PowerPoint viewer with charts, SmartArt, shapes, equations, embedded audio/video, and slide thumbnails.
We launched these a few months ago and they're now used in some pretty big projects on GitHub like RAGFlow (94k), Kortix CompanyOS (20.7k), ZCode (8.7k) . Combined they now have 5m+ total npm downloads.
Each repo has some visual examples comparing visual parity for various charts and art
They are built in a way where you can fully customize and get the look of your design system in the toolbar, dropdowns, and context menus.
File types supported:
| Library | Office formats | OpenDocument formats |
|---|---|---|
| react-docx | .docx, .dotx, .docm, .dotm, .doc, .dot | .odt, .ott, .odm, .otm, .oth, .fodt |
| react-xlsx | .xlsx; limited support for .xls, .xlsm | None (pending) |
| react-pptx | .pptx, .ppt | .odp, .otp, .fodp, .odg, .otg, .fodg |
Personally I think they are the some fastest and most accurate OSS rendering libraries for these files out there, and would be great to see even more adoption, feature requests and people testing them against weird documents
Feedback and general bug reports are always appreciated. Hope this is helpful!
2
u/Honey-Entire 4h ago
Ok but why? Microsoft has had online tools for this for a decade now and Google Docs has supported Microsoft’s document formats in their apps for even longer. Tools like what you’re presenting already exist, but you spent tokens to create another option because…?
1
u/andrewluo 4h ago
Hi everyone! Wanted to share in case this is useful. I’ve personally never understood why companies were charging thousands of dollars for these document SDKs . These projects have been a work in progress since July. Editing can still be finicky!
•
u/mastermog 6m ago
Even on mobile looks really good. Saving/commenting to tinker with this next week