Spire.XLS for Java 15.7.7 现已正式发布。最新版本支持 MarkerDesigner 使用 Array 数据。此外,该版本还成功修复了一些已知问题,例如 Excel 转 PDF,linux 环境下字体不正确的问题。更多详情请查阅下面的内容。
新功能:
- MarkerDesigner支持使用 Array 数据。
Workbook workbook = new Workbook();
// Get the first worksheet from the workbook
Worksheet sheet = workbook.getWorksheets().get(0);
// Set the value of cell range A1 to "&=Array"
sheet.getCellRange("A1").setValue("&=Array");
// Add a parameter named "Array" with an array of strings as its value
workbook.getMarkerDesigner().addArray("Array",new String[] { "Spire.Xls", "Spire.Doc","Spire.PDF", "Spire.Presentation","Spire.Email" });
// Apply the marker design to the workbook
workbook.getMarkerDesigner().apply();
// Calculate all the values in the workbook
workbook.calculateAllValue();
// Auto-fit the rows and columns in the allocated range of the worksheet
sheet.getAllocatedRange().autoFitRows();
sheet.getAllocatedRange().autoFitColumns();
// Save the workbook to the specified file path using Excel 2013 format
workbook.saveToFile(outputFile, ExcelVersion.Version2013);
// Clean up and release resources used by the workbook
workbook.dispose();
问题修复:
- 修复了 Excel 转 PDF,linux 环境下字体不正确的问题。
- 修复了 Excel 转 HTML,设置 “isWriteUnMergedColSpan(false)" 效果不正确的问题。
- 修复了加载 Excel 文档,程序抛 “ Invalid formula:"=#ref!".” 的问题。
- 修复了 Excel 转 PDF,布局效果不正确的问题。
- 修复了加载 Excel 文档,程序抛 "java.lang.NullPointerException" 的问题。
- 内部对 "sun.misc.BASE64Decoder" 的引用进行调整。
获取 Spire.XLS for Java 15.7.7,请点击: