为什么 Excel 会"罢工"Why Excel Chokes
Excel 把整张表一次性装进内存并渲染,行数到 100 万左右就会变慢、卡死甚至崩溃;更别提几百万行。核心矛盾是"全量载入 + 全量渲染"。
Excel loads and renders the whole sheet at once; around 1 million rows it slows, freezes or crashes — let alone several million. The core conflict is "load everything + render everything".
思路一:只取需要的列与行Approach 1: Take Only the Columns/Rows You Need
大文件里往往只有几列有用。先用 365Lab 的 列操作 删掉无关列,或用 搜索过滤 筛出目标行,再导出小文件,后续无论用 Excel 还是别的工具都轻松。
Huge files often have only a few useful columns. Drop the rest with 365Lab's Columns, or filter the target rows with Search & Filter, then export a small file — easy everywhere afterward.
思路二:用流式/分页处理Approach 2: Streaming / Pagination
365Lab 解析页采用流式解析 + 分页渲染:数据边读边处理,表格只渲染当前页,所以几十万行也能流畅操作,不会一次性撑爆内存。
365Lab's Parse page uses streaming parse + paginated render: data is processed as it's read, and only the current page is drawn — so hundreds of thousands of rows stay smooth without blowing up memory.
思路三:把"查看"和"处理"分开Approach 3: Separate Viewing from Processing
| 目的Goal | 推荐方式Recommended |
|---|---|
| 快速看几行Quick peek | 365Lab 解析预览(分页)365Lab Parse preview (paginated) |
| 做聚合统计Aggregate stats | 统计图表 / 透视表Stats & Charts / Pivot |
| 复杂查询Complex query | SQL 查询(把数据当表查)SQL Query (treat data as a table) |
| 自动化批量Automation at scale | 命令行(见下文)Command line (below) |
思路四:命令行工具(GB 级)Approach 4: Command-Line Tools (GB-scale)
当文件大到浏览器也不便时,用命令行按行处理几乎不占内存:
When a file is too big even for the browser, line-based CLI tools use almost no memory:
head -n 100 big.csv:先看前 100 行结构。csvcut -c 1,3 big.csv > small.csv(csvkit):只抽第 1、3 列。grep "关键词" big.csv > matched.csv:筛出含关键词的行。
head -n 100 big.csv: peek at the first 100 rows' structure.csvcut -c 1,3 big.csv > small.csv(csvkit): keep only columns 1 and 3.grep "keyword" big.csv > matched.csv: filter rows containing a keyword.
一份实用处理顺序A Practical Order of Operations
- 用 365Lab 解析预览,确认列结构与编码(必要时先 转 UTF-8)。
- 删掉无关列、筛掉无关行,导出精简版。
- 在精简版上做清洗、去重、统计、转换。
- 若仍需全量,用 SQL 查询或命令行分批处理。
- Preview with 365Lab; confirm columns and encoding (convert to UTF-8 first if needed — see encoding).
- Drop unneeded columns and rows; export a slim version.
- Clean, dedupe, stats and convert on the slim version.
- If you still need the full set, use SQL Query or CLI in batches.