How to Export YouTube Transcripts to Excel-Ready CSV & SQLite (Without the 32,767-Character Bug)
Target Workflow: Data analysts and researchers exporting YouTube transcripts to CSV who encounter garbled non-ASCII characters (mojibake) in Excel or truncated cells on long videos.
Exporting hundreds of YouTube video transcripts into a CSV file for Microsoft Excel, Google Sheets, or Pandas sounds trivial until you hit two classic data-engineering bugs: UTF-8 encoding corruption (mojibake) on Windows Excel, and silent cell splitting when a single podcast transcript exceeds Excel’s hard limit of 32,767 characters per cell.
1. The Microsoft Excel 32,767-Character Cell Limit Explained
According to Microsoft’s official Excel Specifications and Limits, the maximum number of characters that a single worksheet cell can contain is 32,767 characters.
In our verified 1,023-video channel benchmark, the average video transcript was 17,499 characters—meaning standard 15-to-25-minute videos fit comfortably inside a single CSV cell, while 60-to-120-minute interviews (45,000–90,000 characters) will exceed Excel’s cell limit if opened directly in Excel.
2. Choosing the Right CSV Export Mode in Shirube Transcript Tool
In Shirube YouTube Transcript Tool v1.1.1, you can switch between three CSV modes at any time (and click 📊 Re-Export CSV without re-downloading a single video because all data is stored in channel_cache.db):
- Full Text (
--csv-mode include_text): Writes the entire continuous transcript into thetranscript_textcolumn. Best for Python (pandas.read_csv), R, DuckDB, or channels where videos are under 30 minutes. - TXT Path Only (
--csv-mode path_only): Writes only the relative path (transcripts/{video_id}.txt) in the CSV while keeping full timestamped text in thetranscripts/folder. Guarantees 100% clean rows in Microsoft Excel even for 4-hour livestreams. - Both (
--csv-mode both): Includes bothtranscript_fileandtranscript_textcolumns intranscripts.csv.
3. Why utf-8-sig (UTF-8 with BOM) Prevents Garbled Text
When you double-click a standard UTF-8 .csv file on Windows, Excel defaults to the legacy system ANSI codepage unless a 3-byte Byte Order Mark (EF BB BF) is present at byte 0. Every CSV exported by core/db.py uses Python’s encoding="utf-8-sig" and csv.QUOTE_MINIMAL, ensuring that English smart quotes, Japanese kanji, Spanish accents, and German umlauts open cleanly on first double-click.