Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

Excel conversion

Convert XLS and XLSX in .NET

Modernize Excel 97–2003 XLS workbooks or create supported XLS output from XLSX with OfficeIMO.Excel compatibility diagnostics.

XLS and XLSX summary
Input
XLS
Output
XLSX
Runs on
.NET on Windows, Linux, and macOS
Microsoft Office
Not required
License
MIT

XLS has older limits and feature models. Review diagnostics for formulas, charts, macros, drawings, formatting, and worksheet dimensions.

Explore all conversion guides

Practical steps

Convert an XLS workbook to XLSX with OfficeIMO.Excel

Inspect an XLS workbook, enforce a compatibility policy, and write XLSX without Microsoft Excel.

  1. InstallAdd the OfficeIMO.Excel NuGet package.
  2. AnalyzePreview formulas, styles, charts, and other compatibility findings.
  3. ConvertCall ExcelDocument.Convert with XLS and XLSX paths.
  4. ValidateOpen or inspect the output required by the target workflow.

OfficeIMO.Excel reads legacy BIFF workbooks and modern Open XML workbooks through one Excel API. That makes it useful for finance archives, line-of-business exports, scheduled imports, and migrations where .xls still appears alongside .xlsx.

XLS to XLSX

using OfficeIMO.Excel;

ExcelDocumentConversionReport preview =
    ExcelDocument.AnalyzeConversion("forecast.xls", "forecast.xlsx");

ExcelDocumentConversionResult result =
    ExcelDocument.Convert("forecast.xls", "forecast.xlsx");

The conversion report describes how worksheets, formulas, formatting, charts, drawing objects, validation, names, macros, and other tracked capabilities are handled. A batch process can accept known approximations while blocking findings that would change business meaning.

XLSX to XLS

using OfficeIMO.Excel;

ExcelDocumentConversionResult result =
    ExcelDocument.Convert("forecast.xlsx", "forecast.xls");

The older XLS format has stricter limits and different feature models. Analyze before writing if the workbook uses modern tables, chart features, conditional formatting, rich drawings, or dimensions beyond legacy limits.

A safe migration pattern

Keep the original file until the converted workbook passes the checks your workflow values: formula preservation, named ranges, worksheet dimensions, expected values, or a controlled desktop-Excel validation step. OfficeIMO can run without Excel; an optional Excel check can still act as an independent oracle for high-value migrations.

See Excel compatibility for the tracked support boundary and the Excel guide for editing after conversion.

Example source

Download source