Package com.basiscomponents.db.export
Class XlsxExport
- java.lang.Object
-
- com.basiscomponents.db.export.XlsxExport
-
public class XlsxExport extends Object
-
-
Constructor Summary
Constructors Constructor Description XlsxExport()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
writeXLSX(ResultSet rs, OutputStream out, boolean writeHeader, boolean useLabelIfPresent, String sheetName, DataRow AttributesRecord, SheetConfiguration sheetConfig)
Writes the content of the given ResultSet into an output stream.
-
-
-
Method Detail
-
writeXLSX
public static void writeXLSX(ResultSet rs, OutputStream out, boolean writeHeader, boolean useLabelIfPresent, String sheetName, DataRow AttributesRecord, SheetConfiguration sheetConfig) throws Exception
Writes the content of the given ResultSet into an output stream.- Parameters:
resultSet
- The ResultSet to export.out
- The output stream in which to write the ResultSet's content.writeHeader
- The boolean value indicating whether writing the column headers or not.useLabelIfPresent
- if the attributes record contains labels, use the label instead of the field name.sheetName
- A custom name for the sheetDataRow
- attributesRecord the attributes record for formatting- Throws:
Exception
- Gets thrown in case the ResultSet could not be read or output stream can not be written
-
-