We’re pleased to announce the release of Spire.XLS 16.10.3. This version adds support for converting TSV files to PDF and fixes issues related to formula calculation during Excel-to-PDF conversion and data export. It also updates the .NET Core packaging and image-processing dependencies for .NET 6.0, .NET 9.0, and .NET 10.0. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| New Feature | SPIREXLS-6225 | Added support for parsing .tsv files and converting them to PDF.
Workbook workbook = new Workbook();
workbook.LoadFromFile(inputFile, "\t");
workbook.SaveToFile(outputFile, FileFormat.PDF);
workbook.Dispose();
|
| Adjustment | - | Updated the .NET Core packaging and dependencies for .NET 6.0, .NET 9.0, and .NET 10.0 to improve cross-platform compatibility by following the .NET Standard specifications. Image processing has been migrated from System.Drawing to SkiaSharp. Other platforms remain unchanged. |
| Bug Fix | SPIREXLS-6223 | Fixed an issue with incorrect updated formula calculation values when converting Excel to PDF. |
| Bug Fix | SPIREXLS-6224 | Fixed an issue where string values in date columns were exported as empty when using ExportDataTable. |
.NET Core Packaging and Image Processing Changes
The dependencies for .NET 6.0, .NET 9.0, and .NET 10.0 have been updated as follows.
The dependencies listed here are minimum versions.
| Dependency | .NET 6.0 | .NET 9.0 | .NET 10.0 |
| SkiaSharp | ≥ 3.116.1 | ≥ 3.116.1 | ≥ 3.116.1 |
| Microsoft.Win32.Registry | ≥ 5.0.0 | ≥ 5.0.0 | ≥ 5.0.0 |
| System.Buffers | ≥ 4.5.1 | ≥ 4.5.1 | ≥ 4.5.1 |
| System.Memory | ≥ 4.5.5 | ≥ 4.5.5 | ≥ 4.5.5 |
| System.Text.Encoding.CodePages | ≥ 6.0.0 | ≥ 9.0.0 | ≥ 10.0.0 |
| HarfBuzzSharp | ≥ 8.3.0.1 | ≥ 8.3.0.1 | ≥ 8.3.0.1 |
Image Export Code Migration
When exporting a worksheet to an image, the returned value is now a Stream. The image stream can be copied to a file instead of calling Save() directly on the result.
- Previous code using System.Drawing:
- Updated code using SkiaSharp-based image processing:
Workbook workbook = new Workbook();
workbook.LoadFromFile(@"in.xlsx");
Worksheet sheet = workbook.Worksheets[0];
sheet.ToImage(sheet.FirstRow, sheet.FirstColumn, sheet.LastRow, sheet.LastColumn).Save("SheetToImage.png");
Workbook workbook = new Workbook();
workbook.LoadFromFile(@"in.xlsx");
Worksheet sheet = workbook.Worksheets[0];
Stream image = sheet.ToImage(sheet.FirstRow, sheet.FirstColumn, sheet.LastRow, sheet.LastColumn);
string filename = String.Format("SheetToImage.png");
FileStream fileStream = new FileStream(filename, FileMode.Create, FileAccess.Write);
image.CopyTo(fileStream, 100);
fileStream.Flush();
fileStream.Close();
image.Close();
Click the link below to download Spire.XLS version: