Spire.XLS 13.1.1

.NET 6.0 .NET Core 2.0 .NET Framework 4.0
dotnet add package Spire.XLS --version 13.1.1
NuGet\Install-Package Spire.XLS -Version 13.1.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Spire.XLS" Version="13.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Spire.XLS --version 13.1.1
#r "nuget: Spire.XLS, 13.1.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Spire.XLS as a Cake Addin
#addin nuget:?package=Spire.XLS&version=13.1.1

// Install Spire.XLS as a Cake Tool
#tool nuget:?package=Spire.XLS&version=13.1.1

.NET API for Processing Excel Documents

Foo

Product Page | Documentation | Examples | Forum | Temporary License | Customized Demo

Spire.XLS for .NET is a professional Excel .NET API that can be used to create, read, write, convert and print Excel files in any type of .NET ( C#, VB.NET, ASP.NET, .NET Core, .NET 5.0, MonoAndroid and Xamarin.iOS) application without installing Microsoft Office.

The API supports both the old Excel 97-2003 format (.xls) and the new Excel 2007, Excel 2010, Excel 2013, Excel 2016 and Excel 2019 (.xlsx, .xlsb, .xlsm), along with Open Office(.ods) format. It features fast and reliably compared with developing your own spreadsheet manipulation solution or using Microsoft Automation.

100% Standalone .NET API

Spire.XLS for .NET is a 100% standalone Excel .NET library without requiring Microsoft Excel or Microsoft Office to be installed on the system.

Freely Operate Excel Files

Powerful & High Quality Excel File Conversion

Examples

Create an Excel File in C#

using Spire.Xls;
using System.IO;
namespace CreateExcelFiles
{
    class Program
    {

        static void Main(string[] args)
        {
            //A: Dynamically create Excel file and save it to stream
            Workbook wbToStream = new Workbook();
            Worksheet sheet = wbToStream.Worksheets[0];
            sheet.Range["C10"].Text = "The sample demonstrates how to save an Excel workbook to stream.";
            FileStream file_stream = new FileStream("To_stream.xls", FileMode.Create);
            wbToStream.SaveToStream(file_stream);
            file_stream.Close();
            System.Diagnostics.Process.Start("To_stream.xls");

            //B. Load Excel file from stream
            Workbook wbFromStream = new Workbook();
            FileStream fileStream = File.OpenRead("sample.xls");
            fileStream.Seek(0, SeekOrigin.Begin);
            wbFromStream.LoadFromStream(fileStream);
            wbFromStream.SaveToFile("From_stream.xls", ExcelVersion.Version97to2003);
            fileStream.Dispose();
            System.Diagnostics.Process.Start("From_stream.xls");
        }

    }
}

Convert Excel to PDF in C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Spire.Xls;

namespace ToPDF
{
    class Program
    {
        static void Main(string[] args)
        {
            Workbook workbook = new Workbook();
            workbook.LoadFromFile("Sample.xlsx", ExcelVersion.Version2010);
            workbook.SaveToFile("result.pdf", Spire.Xls.FileFormat.PDF);
         }
    }
}

Convert Excel to Image in C#

using Spire.Xls;
namespace Xls2Image

{
    class Program
    {
        static void Main(string[] args)
        {
            Workbook workbook = new Workbook();
            workbook.LoadFromFile(@"..\..\test.xls");
            Worksheet sheet = workbook.Worksheets[0];
            sheet.SaveToImage("sample.jpg");
        }
    }
}

Product Page | Documentation | Examples | Forum | Temporary License | Customized Demo

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Framework net40 net403 net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48 net481
MonoAndroid monoandroid
Xamarin.iOS xamarinios
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (12)

Showing the top 5 NuGet packages that depend on Spire.XLS:

Package Downloads
KCore_bfagundes

My personal library to work SAP projects.

HBInformationBase

Huabin science and technology basic information database

Balcony.Framework

Balcony's Framework

Nvideo.Infrastructure

Package Description

JecoreDotNetCommon

ebitoo 前端函数库 测试发布 1

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
13.1.1 3,492 1/17/2023
12.12.3 4,950 12/23/2022
12.11.3 5,098 11/25/2022
12.10.1 9,020 10/20/2022
12.9.2 6,698 9/23/2022
12.8.1 13,489 8/17/2022
12.7.1 15,957 7/13/2022
12.6.1 16,646 6/13/2022
12.5.3 8,636 5/26/2022
12.5.1 8,004 5/13/2022
12.4.1 15,359 4/15/2022
12.3.8 30,337 3/23/2022
12.3.2 7,508 3/4/2022
12.1.0 13,860 1/24/2022
11.12.2 24,650 12/17/2021
11.11.2 19,208 11/25/2021
11.10.5 41,559 10/28/2021
11.10.4 14,337 10/25/2021
11.9.3 12,541 9/16/2021
11.9.2 5,801 9/14/2021
11.8.0 25,008 8/6/2021
11.7.0 16,835 7/8/2021
11.6.1 9,266 6/10/2021
11.4.6 15,132 4/30/2021
11.4.0 17,327 4/7/2021
11.3.4 11,755 3/12/2021
11.2.6 11,873 2/23/2021
11.2.3 4,526 2/8/2021
11.1.0 8,786 1/22/2021
10.12.0 26,065 12/3/2020
10.11.7 7,286 11/18/2020
10.11.2 4,129 11/6/2020
10.10.6 16,356 10/15/2020
10.9.16 5,635 9/28/2020
10.9.0 14,290 9/2/2020
10.8.3 9,619 8/11/2020
10.7.2 28,131 7/8/2020
10.5.7 25,580 5/21/2020
10.4.9 11,685 4/23/2020
10.3.8 7,983 3/26/2020
10.3.0 32,412 3/2/2020
10.2.8 5,485 2/20/2020
10.1.8 21,430 1/21/2020
10.1.1 8,444 1/8/2020
9.12.20 16,176 12/19/2019
9.11.14 11,078 11/26/2019
9.11.2 7,518 11/8/2019
9.10.12 8,099 10/25/2019
9.10.4 7,737 10/11/2019
9.9.13 8,759 9/26/2019
9.9.5 7,367 9/12/2019
9.9.0 6,400 9/2/2019
9.8.11 5,034 8/23/2019
9.8.5 4,576 8/15/2019
9.7.0 10,219 7/11/2019
9.6.12 4,642 7/1/2019
9.6.7 3,389 6/19/2019
9.6.1 3,275 6/6/2019
9.5.11 3,879 5/23/2019
9.5.6 2,254 5/16/2019
9.5.4 3,846 5/13/2019
9.5.0 4,217 5/1/2019
9.4.6 23,542 4/15/2019
9.4.0 7,775 4/2/2019
9.3.10 11,078 3/21/2019
9.3.4 1,608 3/13/2019
9.2.11 19,310 2/27/2019
9.2.8 2,422 2/21/2019
9.1.22 13,169 2/1/2019
9.1.14 3,307 1/24/2019
9.1.0 8,028 1/10/2019
8.12.11 8,619 12/28/2018
8.12.3 4,136 12/11/2018
8.11.6 9,319 11/21/2018
8.11.2 2,867 11/13/2018
8.10.7 4,784 10/31/2018
8.10.2 6,076 10/12/2018
8.9.8 4,154 9/30/2018
8.9.3 3,533 9/18/2018
8.8.5 4,309 8/29/2018
8.8.1 24,526 8/8/2018
8.8.0 2,466 8/1/2018
8.7.2 3,457 7/12/2018
8.6.6 4,062 6/28/2018
8.6.1 2,630 6/21/2018
8.5.1 5,243 5/11/2018
8.0.0 5,345 2/8/2018
7.12.150 4,350 2/6/2018
7.12.144 9,126 1/12/2018
7.12.140 3,244 12/28/2017
7.12.130 2,624 12/14/2017
7.12.125 3,393 12/4/2017
7.12.109 2,987 11/7/2017
7.12.100 2,320 10/23/2017
7.12.90 5,487 9/28/2017
7.12.76 4,492 8/22/2017
7.12.69 2,407 8/11/2017
7.12.55 3,794 7/18/2017
7.12.43 1,656 7/3/2017
7.12.27 5,769 6/9/2017
7.12.19 3,743 5/26/2017
7.12.11 3,959 5/9/2017
7.12.7 2,295 5/4/2017
7.12.0 10,696 4/24/2017
7.11.59 7,364 2/28/2017
7.11.49 5,587 1/24/2017