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

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

Introduction

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

Prototype

public static void optimiseFonts(HSSFWorkbook workbook) 

Source Link

Document

Goes through the Workbook, optimising the fonts by removing duplicate ones.

Usage

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

License:Apache License

public void optimizeHSSFWorkbookFonts() {
    if (workbook == null) {
        throw new IllegalStateException("Workbook is not initialized.");
    }//w ww .  j  av a2s  .  c om
    if (workbook instanceof HSSFWorkbook) {
        HSSFOptimiser.optimiseFonts((HSSFWorkbook) workbook);
    }
}