Spire.XLS
13.9.1
dotnet add package Spire.XLS --version 13.9.1
NuGet\Install-Package Spire.XLS -Version 13.9.1
<PackageReference Include="Spire.XLS" Version="13.9.1" />
paket add Spire.XLS --version 13.9.1
#r "nuget: Spire.XLS, 13.9.1"
// Install Spire.XLS as a Cake Addin
#addin nuget:?package=Spire.XLS&version=13.9.1
// Install Spire.XLS as a Cake Tool
#tool nuget:?package=Spire.XLS&version=13.9.1
.NET API for Processing Excel Documents
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
- Create/Save/Merge/Split/Get Excel files.
- Encrypt/Decrypt Excel files, add/delete digital signature, tracking changes, lock/unlock worksheets.
- Create/Add/Rename/Edit/Delete/Move worksheets.
- Insert/Modify/Remove hyperlinks.
- Add/Remove/Change/Hide/Show comments in Excel.
- Merge/Unmerge Excel cells, freeze/unfreeze Excel panes, insert/delete Excel rows and columns.
- Add/Read/Calculate/Remove Excel formulas.
- Create/Refresh pivot table.
- Apply/Remove conditional format in Excel.
- Add/Set/Change Excel header and footer.
Powerful & High Quality Excel File Conversion
- Convert Excel to PDF/Excel to HTML/Excel to XML/Excel to CSV/Excel to Image/Excel to XPS/Excel to SVG
- Convert CSV to Excel/CSV toPDF/Datatable
- Convert selected range of cells to PDF
- Convert XLS to XLSM and maintain macro
- Convert Excel to OpenDocument Spreadsheet(.ods) format
- Save Excel chart sheet to SVG/Image
- Convert HTML to Excel
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 Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. |
.NET Core | netcoreapp2.0 is compatible. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid is compatible. |
Xamarin.iOS | xamarinios is compatible. |
-
.NETCoreApp 2.0
- System.Drawing.Common (>= 4.5.0)
- System.Security.Cryptography.Xml (>= 4.5.0)
- System.Text.Encoding.CodePages (>= 4.5.0)
-
.NETFramework 4.0
- No dependencies.
-
MonoAndroid 0.0
- SkiaSharp (>= 1.68.0)
- System.Text.Encoding.CodePages (>= 4.6.0)
-
net6.0
- System.Drawing.Common (>= 6.0.0)
- System.Security.Cryptography.Xml (>= 6.0.0)
- System.Text.Encoding.CodePages (>= 6.0.0)
-
Xamarin.iOS 0.0
- SkiaSharp (>= 1.68.0)
- System.Text.Encoding.CodePages (>= 4.6.0)
NuGet packages (12)
Showing the top 5 NuGet packages that depend on Spire.XLS:
Package | Downloads |
---|---|
HBInformationBase
Huabin science and technology basic information database |
|
KCore_bfagundes
My personal library to work SAP projects. |
|
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.9.1 | 2,462 | 9/14/2023 |
13.8.9 | 4,055 | 8/25/2023 |
13.8.0 | 9,855 | 8/2/2023 |
13.7.0 | 13,459 | 7/4/2023 |
13.6.0 | 6,682 | 6/14/2023 |
13.5.6 | 9,779 | 6/1/2023 |
13.5.0 | 7,845 | 5/12/2023 |
13.4.0 | 10,988 | 4/10/2023 |
13.3.2 | 13,178 | 3/15/2023 |
13.2.4 | 22,201 | 2/16/2023 |
13.1.1 | 19,915 | 1/17/2023 |
12.12.3 | 21,249 | 12/23/2022 |
12.11.3 | 19,427 | 11/25/2022 |
12.10.1 | 24,269 | 10/20/2022 |
12.9.2 | 23,499 | 9/23/2022 |
12.8.1 | 28,684 | 8/17/2022 |
12.7.1 | 24,658 | 7/13/2022 |
12.6.1 | 26,899 | 6/13/2022 |
12.5.3 | 11,176 | 5/26/2022 |
12.5.1 | 10,344 | 5/13/2022 |
12.4.1 | 20,677 | 4/15/2022 |
12.3.8 | 44,866 | 3/23/2022 |
12.3.2 | 10,860 | 3/4/2022 |
12.1.0 | 19,680 | 1/24/2022 |
11.12.2 | 33,379 | 12/17/2021 |
11.11.2 | 26,451 | 11/25/2021 |
11.10.5 | 85,581 | 10/28/2021 |
11.10.4 | 19,026 | 10/25/2021 |
11.9.3 | 25,167 | 9/16/2021 |
11.9.2 | 9,964 | 9/14/2021 |
11.8.0 | 30,401 | 8/6/2021 |
11.7.0 | 19,405 | 7/8/2021 |
11.6.1 | 13,041 | 6/10/2021 |
11.4.6 | 20,727 | 4/30/2021 |
11.4.0 | 23,863 | 4/7/2021 |
11.3.4 | 14,557 | 3/12/2021 |
11.2.6 | 18,275 | 2/23/2021 |
11.2.3 | 5,998 | 2/8/2021 |
11.1.0 | 12,660 | 1/22/2021 |
10.12.0 | 32,975 | 12/3/2020 |
10.11.7 | 9,026 | 11/18/2020 |
10.11.2 | 5,273 | 11/6/2020 |
10.10.6 | 19,389 | 10/15/2020 |
10.9.16 | 6,968 | 9/28/2020 |
10.9.0 | 17,899 | 9/2/2020 |
10.8.3 | 11,016 | 8/11/2020 |
10.7.2 | 34,675 | 7/8/2020 |
10.5.7 | 35,231 | 5/21/2020 |
10.4.9 | 15,933 | 4/23/2020 |
10.3.8 | 10,224 | 3/26/2020 |
10.3.0 | 44,640 | 3/2/2020 |
10.2.8 | 7,202 | 2/20/2020 |
10.1.8 | 25,424 | 1/21/2020 |
10.1.1 | 9,893 | 1/8/2020 |
9.12.20 | 20,657 | 12/19/2019 |
9.11.14 | 14,111 | 11/26/2019 |
9.11.2 | 11,367 | 11/8/2019 |
9.10.12 | 10,468 | 10/25/2019 |
9.10.4 | 8,701 | 10/11/2019 |
9.9.13 | 9,600 | 9/26/2019 |
9.9.5 | 9,841 | 9/12/2019 |
9.9.0 | 7,920 | 9/2/2019 |
9.8.11 | 6,122 | 8/23/2019 |
9.8.5 | 5,550 | 8/15/2019 |
9.7.0 | 13,005 | 7/11/2019 |
9.6.12 | 5,408 | 7/1/2019 |
9.6.7 | 4,233 | 6/19/2019 |
9.6.1 | 4,361 | 6/6/2019 |
9.5.11 | 4,608 | 5/23/2019 |
9.5.6 | 3,028 | 5/16/2019 |
9.5.4 | 4,632 | 5/13/2019 |
9.5.0 | 5,331 | 5/1/2019 |
9.4.6 | 24,799 | 4/15/2019 |
9.4.0 | 12,556 | 4/2/2019 |
9.3.10 | 14,354 | 3/21/2019 |
9.3.4 | 2,414 | 3/13/2019 |
9.2.11 | 20,471 | 2/27/2019 |
9.2.8 | 3,217 | 2/21/2019 |
9.1.22 | 16,015 | 2/1/2019 |
9.1.14 | 3,868 | 1/24/2019 |
9.1.0 | 9,592 | 1/10/2019 |
8.12.11 | 9,291 | 12/28/2018 |
8.12.3 | 5,247 | 12/11/2018 |
8.11.6 | 11,101 | 11/21/2018 |
8.11.2 | 3,573 | 11/13/2018 |
8.10.7 | 5,792 | 10/31/2018 |
8.10.2 | 7,607 | 10/12/2018 |
8.9.8 | 5,164 | 9/30/2018 |
8.9.3 | 4,320 | 9/18/2018 |
8.8.5 | 5,061 | 8/29/2018 |
8.8.1 | 29,317 | 8/8/2018 |
8.8.0 | 3,059 | 8/1/2018 |
8.7.2 | 4,003 | 7/12/2018 |
8.6.6 | 5,025 | 6/28/2018 |
8.6.1 | 7,937 | 6/21/2018 |
8.5.1 | 5,965 | 5/11/2018 |
8.0.0 | 6,209 | 2/8/2018 |
7.12.150 | 5,380 | 2/6/2018 |
7.12.144 | 13,405 | 1/12/2018 |
7.12.140 | 3,889 | 12/28/2017 |
7.12.130 | 3,211 | 12/14/2017 |
7.12.125 | 3,969 | 12/4/2017 |
7.12.109 | 3,643 | 11/7/2017 |
7.12.100 | 2,879 | 10/23/2017 |
7.12.90 | 6,120 | 9/28/2017 |
7.12.76 | 5,261 | 8/22/2017 |
7.12.69 | 3,153 | 8/11/2017 |
7.12.55 | 4,459 | 7/18/2017 |
7.12.43 | 2,202 | 7/3/2017 |
7.12.27 | 6,801 | 6/9/2017 |
7.12.19 | 4,474 | 5/26/2017 |
7.12.11 | 4,634 | 5/9/2017 |
7.12.7 | 2,909 | 5/4/2017 |
7.12.0 | 12,248 | 4/24/2017 |
7.11.59 | 10,688 | 2/28/2017 |
7.11.49 | 6,297 | 1/24/2017 |