Menu

1 / 2

Parsing XLSX/DOCX in the Browser with Pure Dart — No Server Round-Trip Needed

DEV Community: dart·kanta13jp1·8 days ago
#REzc8G64
#devtodart#devto#dev#supabase#dart
Long article (774 words) — no AI summary yet.
Reading 0:00
15s threshold

Parsing XLSX/DOCX in the Browser with Pure Dart — No Server Round-Trip Needed

Introduction

I'm building jibun inc. , a Flutter Web + Supabase personal SaaS competing with Notion. When Notion 3.6 shipped Excel/Word import, I needed to match that feature fast.

Two constraints made it non-trivial:

No dart:io on Flutter Web — all file content must come through as Uint8List .

Avoiding unnecessary server calls — routing 5 MB Excel files through an Edge Function on every import is bad UX and wastes cold-start latency.

The solution: a pure Dart parser that runs entirely in the browser .

How OOXML Works

Both .xlsx and .docx are ZIP archives containing XML files — the Office Open XML (OOXML) standard. Rename any .xlsx to .zip and unzip it to see:

book.xlsx ├── xl/sharedStrings.xml ← string dictionary ├── xl/worksheets/sheet1.xml ← cell data (index references) └── [Content_Types].xml

Enter fullscreen mode

Exit fullscreen mode

Dart's archive package handles the ZIP layer, and xml handles the XML parsing.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.