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 NuGet package manager.
  2. Search “aspose.cells” to find the desired Aspose.Cells for .NET.
  3. Click on “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 step 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 step 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 .netcore application, named “AsposeCellsTest”.
  2. Open file “AsposeCellsTest.csproj”, add the following lines into it for Aspose.Cells package references:
      <ItemGroup>
        <PackageReference Include="Aspose.Cells" Version="24.3" />
      </ItemGroup>
  3. Open the project with VSCode on Ubuntu: Install Aspose Cells on linux
  4. run test with the following code:

Note: Aspose.Cells For .NetStandard can support your requirement on linux.

Applies to: NetStandard2.0, NetCore2.1, NetCore3.1, Net5.0, Net6.0 and advanced version.

Install Aspose.Cells on MAC OS

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

  1. Create a .netcore 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 test with the following code:
  4. If you need to use drawing-related features, please install libgdiplus in macOS, see: How to Install libgdiplus in macOS

Note: Aspose.Cells For .NetStandard can support your requirement on MAC OS.

Applies to: NetStandard2.0, NetCore2.1, NetCore3.1, Net5.0, Net6.0 and advanced version.

Run Aspose Cells in Docker

How to use graphics library on non-windows platforms with Net6

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

Creating the Hello World Application

The steps below creates 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 a cell accessed.
  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 the scratch, inserts “Hello World!” into cell A1 in the first worksheet and saves as 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 as Excel file.