News Category

Spire.XLS 12.1 supports setting Html string for cell range

2022-01-24 06:47:38

We are happy to announce the release of Spire.XLS 12.1. This version supports setting Html string for cell range, adding conditional formatting for the existing PivotTable and file stream to IsPasswordProtected(), also supports getting the linked cell name of IprstGeomShape, as well as supports calculating a single sheet or a cell range. Besides, it enhances the conversion from Excel to PDF, Excel to HTML, Excel to ODF and HTML to Excel. In addition, it fixes some known issues such as the content was incorrect after saving chart to image. More details are listed below.

Here is a list of changes made in this release

Category ID Description
New feature SPIREXLS-1845 Supports setting Html string for cell range.
Workbook workbook = new Workbook();
workbook.LoadFromFile(@"input.xlsx");
Worksheet sheet = workbook.Worksheets[0];
sheet.Range["A1"].HtmlString = "<div>xxxx<br>yyyy</div>";
New feature SPIREXLS-3586 Supports adding conditional formatting for the existing PivotTable.
Workbook workbook = new Workbook();
workbook.LoadFromFile(@"input.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
PivotTable table = worksheet.PivotTables[0] as PivotTable;
PivotConditionalFormatCollection pcfs = table.PivotConditionalFormats;
PivotConditionalFormat pc = pcfs.AddPivotConditionalFormat();
IConditionalFormat cf = pc.AddCondition();
cf.FormatType = ConditionalFormatType.ContainsBlanks;
cf.FillPattern = ExcelPatternType.Solid;
cf.BackColor = Color.Red;
New feature SPIREXLS-3598 Supports adding file stream to IsPasswordProtected().
bool havepwd = Workbook.IsPasswordProtected(File.OpenRead(inputFile));
var docBytes = File.ReadAllBytes(inputFile);
MemoryStream ms = new MemoryStream(docBytes);
bool havepwd = Workbook.IsPasswordProtected(ms);
New feature SPIREXLS-3614 Supports getting the linked cell name of IPrstGeomShape.
Workbook book = new Workbook();
book.LoadFromFile("input.xlsx");
Worksheet sheet = book.Worksheets["sheet1"];
PrstGeomShapeCollection prstGeomShapeCollection = sheet.PrstGeomShapes;
IPrstGeomShape shape = prstGeomShapeCollection["a"];
shape.LinkedCell.RangeAddressLocal;
New feature SPIREXLS-3630 Supports calculating a single sheet or a cell range.
Workbook workbook = new Workbook();
workbook.LoadFromFile("input.xlsx");
workbook.Worksheets[0].CalculateAllValue();
workbook.Worksheets[0].Range["A1:C3"].CalculateAllValue();
Bug SPIREXLS-3199
SPIREXLS-3217
SPIREXLS-3573
Fixes the issue that the content was incorrect after saving chart to image.
Bug SPIREXLS-3330 Fixes the issue that the content format was incorrect when converting html file to excel.
Bug SPIREXLS-3489
SPIREXLS-3601
SPIREXLS-3619
SPIREXLS-3643
Fixes the issue that the content was incorrect after converting excel file to PDF.
Bug SPIREXLS-3546 Fixes the issue that the result file has opening error after copying a pivot table sheet to another sheet
Bug SPIREXLS-3551 Fixes the issue that the boder lost after converting excel file to ODF.
Bug SPIREXLS-3552 Optimizes the time consumption when saving chart to image.
Bug SPIREXLS-3558 Fixes the issue that the content was incorrect after saving sheet to Html.
Bug SPIREXLS-3559 Fixes the issue that the application threw "System.FormatException" when converting Excel file to PDF.
Bug SPIREXLS-3572 Fixes the issue that the result file was blank after converting Html to Excel.
Bug SPIREXLS-3577 Fixes the issue that the table column width setting didn't take effect when converting Excel to PDF.
Bug SPIREXLS-3588 Fixes the issue that the row height changed after merged the cells that have been set a row height.
Bug SPIREXLS-3589 Fixes the issue that the content was incorrect after converting Excel to Html.
Bug SPIREXLS-3597 Fixes the issue that the application threw an Exception when converting Excel file to PDF in multi-threading.
Bug SPIREXLS-3603 Fixes the issue that the content format was incorrect after converting Excel to Html.
Bug SPIREXLS-3606 Fixes the issue that the application hung a long time when adding two subtotal for worksheet.
Bug SPIREXLS-3610 Fixes the issue that the application threw "System.ArgumentOutOfRangeException" when adding SparklineGroup.
Bug SPIREXLS-3613 Fixes the issue that only the last signature remained after doing multiple signatures.
Bug SPIREXLS-3615 Fixes the issue that the application threw "IOException" when using IsPasswordProtected().
Bug SPIREXLS-3616 Fixes the issue that the obtained value of IPrstGeomShape was incorrect.
Click the link to download Spire.XLS 12.1:
More information of Spire.XLS new release or hotfix: