Getting Started

Installation

Install Aspose.Cells through NuGet

NuGet is the easiest way to download and install Aspose.Cells for .NET.

  1. Open Microsoft Visual Studio and the NuGet package manager.
  2. Search “Aspose.Cells” to find the desired Aspose.Cells for .NET.
  3. Click “Install”. Aspose.Cells for .NET will be downloaded and referenced in your project.
    Install Aspose Cells through NuGet

You can also download it from the NuGet web page for Aspose.Cells:
Aspose.Cells for .NET NuGet Package

More steps for details

Install Aspose.Cells on Windows

  1. Download Aspose.Cells.msi from the following page:
    Download Aspose.Cells.msi
  2. Double‑click the Aspose.Cells.msi and follow the instructions to install it:

Install Aspose Cells on windows

More steps for details

Install Aspose.Cells on Linux

In this example, I use Ubuntu to show how to start using Aspose.Cells on Linux.

  1. Create a .NET Core application, named AsposeCellsTest.
  2. Open the file AsposeCellsTest.csproj and add the following lines to it for Aspose.Cells package references:
      <ItemGroup>
        <PackageReference Include="Aspose.Cells" Version="25.12" />
      </ItemGroup>
  3. Open the project with VS Code on Ubuntu:
    Install Aspose Cells on linux
  4. Run the test with the following code:

Note: Aspose.Cells for .NET Standard can support your requirement on Linux.

Applies to: .NET Standard 2.0, .NET Core 2.1, .NET Core 3.1, .NET 5.0, .NET 6.0 and later versions.

Install Aspose.Cells on macOS

In this example, I use macOS High Sierra to show how to start using Aspose.Cells on macOS.

  1. Create a .NET Core application, named AsposeCellsTest.
  2. Open the application with Visual Studio for Mac, then install Aspose.Cells through NuGet:
    Install Aspose Cells on macOS
  3. Run the test with the following code:
  4. If you need to use drawing‑related features, please install libgdiplus on macOS. See:
    How to Install libgdiplus in macOS

Note: Aspose.Cells for .NET Standard can support your requirement on macOS.

Applies to: .NET Standard 2.0, .NET Core 2.1, .NET Core 3.1, .NET 5.0, .NET 6.0 and later versions.

Run Aspose Cells in Docker

How to use a graphics library on non‑Windows platforms with .NET 6

Aspose.Cells for .NET 6 now uses SkiaSharp as the graphics library, as recommended in the official Microsoft statement. For more details about using Aspose.Cells with .NET 6, please see How to Run Aspose.Cells for .NET 6.

Creating the Hello World Application

The steps below create the Hello World application using the Aspose.Cells API:

  1. If you have a license, then apply it.
    If you are using the evaluation version, skip the license‑related code lines.
  2. Create an instance of the Workbook class to create a new Excel file or open an existing Excel file.
  3. Access any desired cell of a worksheet in the Excel file.
  4. Insert the words Hello World! into the accessed cell.
  5. Generate the modified Microsoft Excel file.

The implementation of the above steps is demonstrated in the examples below.

Code Sample: Creating a New Workbook

The following example creates a new workbook from scratch, inserts Hello World! into cell A1 in the first worksheet, and saves it as an Excel file.

Code Sample: Opening an Existing File

The following example opens an existing Microsoft Excel template file Sample.xlsx, inserts Hello World! into cell A1 in the first worksheet, and saves it as an Excel file.