Class DatasetExcelAdapter
- java.lang.Object
-
- com.inductiveautomation.ignition.common.util.excel.adapters.DatasetExcelAdapter
-
- All Implemented Interfaces:
ExcelAdapter<Dataset,org.apache.poi.xssf.usermodel.XSSFWorkbook>
public class DatasetExcelAdapter extends java.lang.Object implements ExcelAdapter<Dataset,org.apache.poi.xssf.usermodel.XSSFWorkbook>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.inductiveautomation.ignition.common.util.excel.adapters.ExcelAdapter
ExcelAdapter.KnownTypes
-
-
Constructor Summary
Constructors Constructor Description DatasetExcelAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandrawSheet(org.apache.poi.xssf.usermodel.XSSFWorkbook workbook, java.lang.String sheetName, Dataset dataset, boolean headerRow, boolean nullsEmpty)Draws aSheetfor the specificExcelAdapterorg.apache.poi.xssf.usermodel.XSSFWorkbookdrawWorkbook(boolean headerRow, boolean nullsEmpty, Dataset... datasets)Draws the supplied object(s)ExcelAdapterand returnsExcelAdapter
-
-
-
Method Detail
-
drawWorkbook
public org.apache.poi.xssf.usermodel.XSSFWorkbook drawWorkbook(boolean headerRow, boolean nullsEmpty, Dataset... datasets)Description copied from interface:ExcelAdapterDraws the supplied object(s)ExcelAdapterand returnsExcelAdapter- Specified by:
drawWorkbookin interfaceExcelAdapter<Dataset,org.apache.poi.xssf.usermodel.XSSFWorkbook>- Parameters:
headerRow- iftrue, header rows are expected to be written, otherwise false. It is up to the implementation whether this is respected or not.nullsEmpty- iftrue, null values will not be written to cells in the excel document. It is up to the implementation whether this is respected or not.datasets- The object(s) that the Adapter is compatible with for writing.- Returns:
- A
Workbookof typeUthat can be closed or further manipulated.
-
drawSheet
public boolean drawSheet(org.apache.poi.xssf.usermodel.XSSFWorkbook workbook, java.lang.String sheetName, Dataset dataset, boolean headerRow, boolean nullsEmpty)Description copied from interface:ExcelAdapterDraws aSheetfor the specificExcelAdapter- Specified by:
drawSheetin interfaceExcelAdapter<Dataset,org.apache.poi.xssf.usermodel.XSSFWorkbook>- Parameters:
workbook- the Workbook to add the new sheet tosheetName- the name of the sheet. This name should be checked viaWorkbookUtil.createSafeSheetName(String)dataset- the object to write to the sheetheaderRow- iftrue, header rows are expected to be written, otherwise false. It is up to the implementation whether this is respected or not.nullsEmpty- iftrue, null values will not be written to cells in the excel document. It is up to the implementation whether this is respected or not.- Returns:
trueif the object was successfully written to the workbook as a new sheet,falseif the object was not written successfully.
-
-