Convert to Other Excel Format

This demo uses the DevExpress Spreadsheet Document API to convert an Excel document to another format (XLS,XLSX, XLTX, XLSB, CSV, and more). You can process the sample file or supply your own document. To do the latter, select Upload a File in the file selection drop-down menu.

Use the Convert Document to... dropdown button to select the output format, convert the workbook, and download the result.

Sample document
InvestmentPortfolio.xlsx



using DevExpress.Spreadsheet;

Stream ConvertDocument(Stream inputStream, DocumentFormat outputFormat) {
    using var workbook = new Workbook();

    workbook.LoadDocument(inputStream);

    var outputStream = new MemoryStream();

    workbook.SaveDocument(outputStream, outputFormat);

    outputStream.Position = 0;
    return outputStream;
}