Spire.XLS 14.5.3 supports adding images to the first page header and footer

2024-05-23 09:37:40

We're pleased to announce the release of Spire.XLS 14.5.3. This version supports adding images to the first page header and footer, obtaining active selection range, as well as finding cells based on regular expressions. In addition, some known issues that occurred when converting Excel to PDF/ images, importing data into Excel, and autofitting columns have been successfully fixed. More details are shown below.

Here is a list of changes made in this release

Category ID Description
New feature SPIREXLS-5128 Supports adding images to the first page header and footer.
//Load image
System.Drawing.Image bufferedImage = System.Drawing.Image.FromFile(inputFile_Img);

//Set image on first page header and footer
wb.Worksheets[0].PageSetup.FirstLeftHeaderImage = bufferedImage;
wb.Worksheets[0].PageSetup.FirstLeftFooterImage = bufferedImage;
wb.Worksheets[1].PageSetup.FirstCenterHeaderImage = bufferedImage;
wb.Worksheets[1].PageSetup.FirstCenterFooterImage = bufferedImage;
wb.Worksheets[2].PageSetup.FirstRightHeaderImage = bufferedImage;
wb.Worksheets[2].PageSetup.FirstRightFooterImage = bufferedImage;
New feature SPIREXLS-5195 Supports obtaining active selection range.
Worksheet worksheet = workbook.Worksheets[0];
string Information = null;
foreach (CellRange range in worksheet.ActiveSelectionRange)
{
Information += "RangeAddressLocal:"+ range.RangeAddressLocal+"\r\n";
Information += "ColumnCount:" + range.ColumnCount + "\r\n";
Information += "ColumnWidth:" + range.ColumnWidth + "\r\n";
Information += "Column:" + range.Column + "\r\n";
Information += "RowCount:" + range.RowCount+ "\r\n";
Information += "RowHeight:" + range.RowHeight + "\r\n";
Information += "Row:" + range.Row + "\r\n";
}
File.WriteAllText(outputFile_TXT,Information);
New feature SPIREXLS-5200 Supports finding cells based on regular expressions.
CellRange[] ranges = sheet.FindAllString(".*test.", false, false, true);
Bug SPIREXLS-5075 Fixes the issue that the image was lost after converting Excel to image.
Bug SPIREXLS-5151 Fixes the issue that the content in the generated PDF document was lost after converting Excel to PDF on the Kirin system.
Bug SPIREXLS-5186 Fixes the issue that the application threw the "System.NullPointerException" when converting sheet to image.
Bug SPIREXLS-5197 Fixes the issue that the border obtained from merged area was incorrect.
Bug SPIREXLS-5198 Fixes the issue that the text and alternative text obtained from checkboxes were incorrect.
Bug SPIREXLS-5214 Fixes the issue that it failed to set the active cell using the SetActiveCell() method.
Bug SPIREXLS-5216 Fixes the issue that the textboxes added to charts were not displayed.
Bug SPIREXLS-5218 Fixes the issue that the name obtained from checkbox was incorrect.
Bug SPIREXLS-5225 Fixes the issue that the mouse cursor position was incorrect after importing data into Excel using the InsertDataTable() method.
Bug SPIREXLS-5228 Fixes the issue that some graphics and lines were lost after converting Excel document to PDF document.
Bug SPIREXLS-5234 Fixes the issue that it failed to autofit columns using the AutoFitCoumns() method.
Click the link to download Spire.XLS 14.5.3:
More information of Spire.XLS new release or hotfix: