Spire.XLS for Java 13.3.6 support converting Excel to standalone HTML files

2023-03-22 09:30:07

We are glad to announce the release of Spire.XLS for Java 13.3.6. This version support converting Excel to standalone HTML files, saving the entire Excel file to an HTML stream, adding conditional formatting to PivotFields and DataFields in pivot tables and replacing part of the text within a cell. What’s more, it also enhances the conversion from Excel to PDF and images. Additionally, some known issues are fixed, such as the issue that the guide lines lost when converting charts to images. More details are listed below.

Here is a list of changes made in this release

Category ID Description
New feature SPIREXLS-3537 Support converting Excel to standalone HTML files.
Workbook wb = new Workbook();
wb.loadFromFile("data/mytest.xlsx");
HTMLOptions.Default.isStandAloneHtmlFile(true);
wb.saveToFile("result.html", FileFormat.HTML);
New feature SPIREXLS-3791 Support saving the entire Excel file to an HTML stream.
Workbook wb = new Workbook();
wb.loadFromFile("data/mytest.xlsx");
FileOutputStream fileStream = new FileOutputStream("output/saveStream_result.html");
wb.saveToStream(fileStream, FileFormat.HTML);
fileStream.close();
New feature SPIREXLS-4385 support adding conditional formatting to PivotFields and DataFields in pivot tables.
PivotTable table = (PivotTable)worksheet.getPivotTables().get(0);
PivotConditionalFormatCollection pcfs = table.getPivotConditionalFormats();
PivotConditionalFormat pc = pcfs.addPivotConditionalFormat(table.getColumnFields().get(0));
//PivotConditionalFormat pc = pcfs.addPivotConditionalFormat(table.getRowFields().get(0));
//PivotConditionalFormat pc = pcfs.addPivotConditionalFormat(table.getDataFields().get(0));
//PivotConditionalFormat pc = pcfs.addPivotConditionalFormat(table.getPageFields().get(0));
IConditionalFormat cf = pc.addCondition();
cf.setFormatType(ConditionalFormatType.ContainsBlanks);
cf.setFillPattern(ExcelPatternType.Solid);
cf.setBackColor(Color.Red);
New feature SPIREXLS-4513 Support replacing part of the text within a cell.
sheet.getCellList().get(0).textPartReplace("Office", "Spire");
Bug SPIREXLS-4489 Fixes the issue that the guide lines lost when converting charts to images.
Bug SPIREXLS-4490 Fixes the issue that some data positions were moved down when converting Excel to images.
Bug SPIREXLS-4508 Fixes the issue that the double underline became a single underline when converting Excel to images.
Bug SPIREXLS-4510 Fixes the issue that the program reported an error "java.lang.NullPointerException" when adding a footer to Excel
Bug SPIREXLS-4511 Fixes the issue that the program reported an error "Invalid sectionId of Header Footer image" when converting Excel to PDF.
Bug SPIREXLS-4514 Fixes the issue that the progress color in the progress bar was lost when converting Excel to images.
Bug SPIREXLS-4537 Fixes the issue that the X-axis data offset when converting charts to images.
Bug SPIREXLS-4547 Fixes the issue that the content was incorrect when converting Excel to PDF.
Click the link to download Spire.XLS for Java 13.3.6: