Example usage for org.apache.poi.hssf.usermodel HSSFOptimiser optimiseCellStyles

List of usage examples for org.apache.poi.hssf.usermodel HSSFOptimiser optimiseCellStyles

Introduction

In this page you can find the example usage for org.apache.poi.hssf.usermodel HSSFOptimiser optimiseCellStyles.

Prototype

public static void optimiseCellStyles(HSSFWorkbook workbook) 

Source Link

Document

Goes through the Wokrbook, optimising the cell styles by removing duplicate ones, and ones that aren't used.

Usage

From source file:de.jlo.talendcomp.excel.SpreadsheetFile.java

License:Apache License

public void optimizeHSSFWorkbookStyles() {
    if (workbook == null) {
        throw new IllegalStateException("Workbook is not initialized.");
    }/*from   w ww  .  j av  a2 s .  c o m*/
    if (workbook instanceof HSSFWorkbook) {
        HSSFOptimiser.optimiseCellStyles((HSSFWorkbook) workbook);
    }
}