Back to Blog
general

Convert Old XLS Files to XLSX (Macros, Batch, Compatibility)

A practical guide to upgrading Excel 97-2003 files: choose between XLSX and XLSM, batch convert hundreds of sheets with LibreOffice soffice, or convert one file online in seconds.

Rumen AtanasovNovember 28, 20266 min read

You open budget-1998.xls in Excel 365, the title bar says Compatibility Mode, and suddenly XLOOKUP returns #NAME?, you can't paste in a 90,000-row export, and half the ribbon is greyed out. Nothing is broken — the file is simply still in the Excel 97-2003 binary format, and Excel is honouring its limits.

The fix is a format upgrade, not a rewrite. This guide shows how to go from xls to xlsx for a single file in under a minute, how to batch convert an entire archive folder from the command line, and how to decide when you need .xlsm instead because the workbook carries macros.

What the old XLS format is actually costing you

XLS is a binary format from 1997. When Excel opens one, it restricts the workbook to what that format can store:

  • Grid size: 65,536 rows and 256 columns, versus 1,048,576 rows and 16,384 columns in XLSX. A modern CSV export will not fit.
  • New functions: dynamic arrays, XLOOKUP, LET, TEXTSPLIT and friends either refuse to calculate or save as #NAME? text once the file round-trips.
  • Modern features: unlimited conditional formatting rules, slicers, newer chart types, 16-million-colour fills and tables behave in a degraded way or not at all.
  • File size: XLSX is zipped XML, so the same workbook usually shrinks noticeably — a 4 MB legacy sales ledger often lands near 1 MB.
  • Longevity: every Excel release pushes XLS further towards blocked-by-default territory in corporate security policies.

Converting also makes the file readable by Google Sheets, Numbers, Python's openpyxl and virtually every modern data tool without a legacy shim.

First decide: XLSX or XLSM?

The old XLS container could hold VBA macros inside the same file. The modern format splits that in two:

  • .xlsx — data, formulas, charts and formatting. Cannot store macros. Save a macro-bearing workbook as XLSX and the VBA is silently dropped.
  • .xlsm — identical to XLSX plus the macro project. Use this for any workbook with buttons, custom functions, Auto_Open routines or forms.

Not sure which you have? Open the file and press Alt+F11. If the VBA editor shows modules with code under your workbook name, you need XLSM. If the project tree is empty, XLSX is the right target and gives you a cleaner, smaller file that opens without macro-security prompts.

The quick route: convert one XLS online

For a handful of files — or when you're on a locked-down machine without Excel or LibreOffice installed — the fastest path is the browser. Drop the file into the XLS to XLSX converter, wait for the job to finish and download the upgraded workbook. A typical 2-5 MB legacy ledger takes a few seconds, and the converted file keeps formulas, number formats, named ranges and charts.

If the same archive folder also contains old .doc reports or .ppt decks, the wider document converter hub at File Convert Online handles those in the same way.

One rule of thumb: if the workbook contains payroll, patient or client data, keep it local and use the command-line method below.

Batch convert an archive with LibreOffice soffice

When the shared drive holds 300 files from 2004, you want one command, not 300 clicks. LibreOffice ships a headless converter called soffice that does exactly this — no Excel licence required.

Convert a single file first to confirm the output looks right:

soffice --headless --convert-to xlsx --outdir ./converted ./budget-1998.xls

Then do the whole folder in one pass:

soffice --headless --convert-to xlsx --outdir ./converted ./archive/*.xls

To preserve VBA, target XLSM and name the filter explicitly:

soffice --headless \
  --convert-to 'xlsm:Calc MS Excel 2007 VBA XML' \
  --outdir ./converted ./archive/*.xls

LibreOffice carries the macro code across into the new container, but it does not execute or validate VBA the way Excel does. Always open one converted .xlsm in Excel and run the key macro before you delete the originals.

Platform paths and the gotchas that bite

  • Windows: the executable isn't on PATH by default. Use "C:\Program Files\LibreOffice\program\soffice.exe" --headless --convert-to xlsx --outdir C:\converted C:\archive\*.xls.
  • macOS: call /Applications/LibreOffice.app/Contents/MacOS/soffice with the same flags.
  • A running LibreOffice window blocks headless mode. Quit the GUI, or isolate the job with -env:UserInstallation=file:///tmp/lo-convert.
  • Recursive folders: *.xls doesn't descend. On Linux/macOS use find ./archive -name '*.xls' -exec soffice --headless --convert-to xlsx --outdir ./converted {} +.
  • Originals are never touched — soffice writes new files into --outdir, so keep the .xls copies until you've spot-checked the results.

What to check in the converted workbook

Legacy workbooks accumulate strange things over 20 years. Spend five minutes on these before you trust the upgrade:

  • Recalculate with Ctrl+Alt+F9 and scan for #REF!, #NAME? or #VALUE!.
  • External links to drives like H:\Finance\2003\ that no longer exist — fix or break them via Data → Edit Links.
  • Named ranges in Formulas → Name Manager; delete the broken ones left by deleted sheets.
  • Pivot tables and charts — refresh each one; very old pivot caches sometimes need rebuilding.
  • Date handling, especially workbooks created on Mac Excel using the 1904 date system.
  • Formatting edge cases such as custom number formats and sheets that relied on exactly 256 columns.

Then save once from Excel itself. That rewrites the file with Excel's own XLSX writer and clears any lingering Compatibility Mode flag.

A 20-minute plan for a legacy spreadsheet archive

  1. Copy the folder to archive-backup/ and leave it untouched.
  2. Sort by size and open the three largest files; check Alt+F11 to see how many carry macros.
  3. Run the soffice batch for plain workbooks into converted/, then a second XLSM pass for the macro ones.
  4. Spot-check 10% of the output — biggest, oldest and most formula-heavy first.
  5. For the handful that fail or that you only need once, run them through the online xls to xlsx converter.
  6. Archive the originals as a zip, and make converted/ the working folder.

FAQ

Does converting XLS to XLSX lose data?

No — XLSX is a superset of what XLS can hold, so cells, formulas, charts and formatting carry over. The one real loss is VBA macros if you choose .xlsx instead of .xlsm.

Can Excel 2003 still open my converted file?

Only with the old Microsoft Compatibility Pack installed. If a colleague is genuinely stuck on Excel 2003, keep a copy of the original .xls alongside the upgraded one.

Why is my XLSX file smaller than the XLS?

XLSX is a zip archive of XML parts, so text and repeated formatting compress well. A shrink of 50-75% on a formula-heavy workbook is normal and not a sign of data loss.

How do I convert XLS to XLSX without Excel?

Use the headless soffice command above, or an online converter in the browser. Both produce a standard XLSX that Excel, Google Sheets and Numbers all read.

Will my old macros still run after conversion?

The code is preserved in XLSM, but macros that call missing add-ins, 32-bit API declarations or removed controls may need PtrSafe updates. Test the critical ones in Excel before retiring the originals.

Ready to Convert Your Files?

Try our free online file converter. No registration required.

Start Converting