公共 API Aspose.Cells 8.0.1 的变化

MemorySetting 属性添加到 Cells 类

Cells 类公开了 setMemorySetting 和 getMemorySetting 方法,可用于优化单元格数据的内存使用,从而降低整体内存成本。以下示例显示如何在优化模式下将大数据写入工作表。

Java

 //Instantiate a new Workbook

Workbook book = new Workbook();

//Set the memory preferences

book.getSettings().setMemorySetting(MemorySetting.MEMORY_PREFERENCE);

//To change the memory setting of existing sheets, please change memory setting for them manually:

Cells cells = book.getWorksheets().get(0).getCells();

cells.setMemorySetting(MemorySetting.MEMORY_PREFERENCE);

//Input large dataset into the cells of the worksheet.

//Your code goes here