Yes, You Can Upload Excel Files to GitHub — But Here’s What Most People Miss

Yes, you can upload Excel files to GitHub. But if you treat .xlsx like source code, you’ll lose every benefit of Git — and waste hours debugging merge conflicts no one can read.

The Problem

You drag Sales_Q3_2024.xlsx into your GitHub repo, click Commit, and think you’re done. You’re not. Excel files are ZIP archives containing XML, binaries, and metadata — Git sees them as opaque blobs. No line-by-line diff. No meaningful history. No way to track who changed cell D7 in Sheet2 last Tuesday.

Worse: two people edit the same file locally, push separately, and GitHub shows a merge conflict you can’t resolve without opening Excel on both machines — then manually reconciling. That’s not version control. That’s file swapping.

MethodTime for 10K rowsAccuracyDifficulty
Drag & drop .xlsx directlyInstant upload, 0s diff timeNone — Git can’t compare cellsEasy (but dangerous)
Save as CSV, commit2s to save + 1s commitFull row/column visibilityMedium (requires discipline)
Use Excel’s "Export to JSON" (Power Query)15–45s setup, then fastPreserves types, nulls, datesHard (needs PQ knowledge)
Convert with Python script pre-commit3s runtime (automated)100% reproducible, auditableHigh (requires dev setup)

The Solution

Do this instead — every time:

  1. Open your Excel file (e.g., Revenue_By_Region.xlsx).
  2. Select the data range you need to track — say A1:F1200 on Sheet "Q3 Summary".
  3. Press Ctrl + C, then open Notepad or VS Code. Paste. You’ll see tab-separated values. Don’t do anything with that yet.
  4. Back in Excel: go to File → Save As → Browse → Choose location → Save as type: CSV (Comma delimited) (*.csv). Name it revenue_q3_2024.csv.
  5. In your local Git repo folder, place that CSV. Run git add revenue_q3_2024.csv and git commit -m "Q3 revenue data refresh".

Now every change appears cleanly in GitHub’s diff view. You’ll see exactly which row was added, which value changed from 42800 to 45200, and who made it.

RowRegionRepAmountDate
1APACSarah Chen$45,2002024-09-12
2EMEADiego Ruiz$38,9502024-09-11
3NAJamal Wright$51,3002024-09-13
4LATAMAna López$29,7002024-09-10
5APACKenji Tanaka$41,1002024-09-12

Going Further

You don’t have to abandon Excel entirely. Use it where it shines — formatting, quick pivots, ad-hoc analysis — but never as your source of truth for shared data.

For multi-sheet workbooks: export each sheet separately. Name them orders_raw.csv, customers_clean.csv, products_metadata.csv. Keep formulas out — if you need calculated columns, move logic to Power Query or Python.

Surprising tip: Excel’s built-in Alt + F + A + T opens the Text Import Wizard — use it to preview CSV structure *before* saving. This catches encoding issues (like Chinese characters turning into ) before they corrupt your repo.

If your team uses Power BI or Tableau: skip CSV. Export from Excel to JSON via Power Query (Data → Get Data → From Other Sources → Blank Query → Advanced Editor → paste =Json.FromValue(Table.ToRecords(Excel.CurrentWorkbook(){[Name="Table1"]}[Content]))). Then commit the .json. It’s human-readable, supports nested data, and plays nice with CI/CD pipelines.

Pro move: Add a .gitattributes file to your repo root with this line:
*.csv diff=csv
Then run git config diff.csv.textconv "cat". Now GitHub renders CSVs with row numbers and column headers — not raw text.

When NOT to Use This

Don’t convert to CSV if your Excel file contains:

  • Formulas referencing other sheets (e.g., =SUM('Q2 Data'!B2:B100)) — those break completely outside Excel.
  • Conditional formatting rules — they’re binary artifacts. No Git diff will show “highlighted red because > $50K”.
  • Embedded charts or images — CSV has no concept of visual objects.
  • Protected sheets or password-locked cells — CSV strips all permissions.

Also skip this workflow if your data is truly ephemeral — e.g., a weekly sales leaderboard you only share internally via Teams. Pushing it to GitHub adds zero value and creates clutter.

One hard rule: Never store credentials, API keys, or PII (like SSNs or full names) in any Excel file — CSV or not — that goes to GitHub. Even private repos get breached. If you must, use GitHub Secrets or Azure Key Vault — not cells B2:C10.

Keyboard Shortcuts

ActionWindows ShortcutNotes
Save As CSVF12 → Tab → Down ×3 → EnterF12 opens Save As; arrow keys navigate format list
Select entire used rangeCtrl + A (twice)First Ctrl+A selects current region; second selects full sheet
Open Power Query EditorAlt + A + PFastest path to transform before export
Paste Special → Values OnlyAlt + E + S + V + EnterCritical before CSV export — kills formulas silently
David Park

David Park

David brings deep expertise in office supply evaluation and procurement. He has tested hundreds of products to help teams make informed purchasing decisions.