HTML JPG PDF XML XLSM
Aspose.Cells  for .NET
XLSM

XLSM File Viewer for .NET

View Excel & OpenOffice spreadsheets such as XLSM without requiring Microsoft Excel or Office Automation.

How to View XLSM File Using C#

In order to view XLSM file, we’ll use

Aspose.Cells for .NET

API which is a feature-rich, powerful and easy to use API for C# platform to be used with any Viewer. Open

NuGet

package manager, search for Aspose.Cells and install. You may also use the following command from the Package Manager Console.

Package Manager Console Command


PM> Install-Package Aspose.Cells

Steps to View XLSM via C#

Aspose.Cells makes it easy for the developers to view the XLSM file with just few lines of code.

  1. Load the XLSM file in an instance of Workbook
  2. Create an instance of HtmlSaveOptions & set ExportHeadings property to true
  3. Save the XLSM file in HTML format using Workbook.Save method
  4. Load resultant HTML in default browser with Process.Start

System Requirements

Aspose.Cells for .NET is supported on all major operating systems. Just make sure that you have the following prerequisites.

  • Microsoft Windows or a compatible OS with .NET Framework, .NET Core, Mono or Xamarin Platforms
  • Development environment like Microsoft Visual Studio
  • Add reference to the Aspose.Cells for .NET DLL in your project
 

C# example code to view XLSM file


string output = System.IO.Path.GetTempPath() + Guid.NewGuid().ToString() + ".html";

// load the XLSM file in an instance of Workbook
var book = new Aspose.Cells.Workbook("template.xlsm");
// create an instance of HtmlSaveOptions & set ExportHeadings property to true
var options = new Aspose.Cells.HtmlSaveOptions();
options.ExportHeadings = true;

// save the XLSM file in HTML format
book.Save(output, options);
// load resultant HTML in default browser
System.Diagnostics.Process.Start(output);
 
  • About Aspose.Cells for .NET API

    Aspose.Cells API can be used to create, edit, convert and render Microsoft Excel formats to different formats. Moreover, it can be used for comprehensive charting, scalable reporting and reliable calculations within software applications. Aspose.Cells is a standalone API and it does not require any software like Microsoft or OpenOffice.

    Free App to View XLSM

    Other Supported Viewer Formats

    Using C#, One can also view many other file formats including.

    CSV (Comma Separated Values)
    ODS (OpenDocument Spreadsheet File)
    TSV (Tab-Separated Values)
    TXT (Text Document)
    XLS (Excel Binary Format)
    XLSB (Binary Excel Workbook File)
    XLSX (OOXML Excel File)
    XLT (Microsoft Excel Template)
    XLTM (Excel Macro-enabled Template)
    XLTX (Office OpenXML Excel Template)