public interface SpreadsheetWriter
Modifier and Type | Interface and Description |
---|---|
static interface |
SpreadsheetWriter.AdditionalSpreadsheetContent |
static interface |
SpreadsheetWriter.SpreadsheetBoolField
Represents a boolean field within the spreadsheet.
|
static interface |
SpreadsheetWriter.SpreadsheetColumn
Represents a column within the spreadsheet.
|
static interface |
SpreadsheetWriter.SpreadsheetDateField
Represents a date field within the spreadsheet.
|
static interface |
SpreadsheetWriter.SpreadsheetField
Represents a field within the spreadsheet.
|
static interface |
SpreadsheetWriter.SpreadsheetFormulaField
Represents a field holding a formula.
|
static interface |
SpreadsheetWriter.SpreadsheetIntField
Represents an integer field within the spreadsheet.
|
static interface |
SpreadsheetWriter.SpreadsheetNumericField
Represents a numeric field within the spreadsheet.
|
static interface |
SpreadsheetWriter.SpreadsheetTextField
Represents a text field within the spreadsheet.
|
static class |
SpreadsheetWriter.Style
Via the
SpreadsheetWriter.Style class, you can manipulate how the data within a
field or column is presented and formatted. |
Modifier and Type | Method and Description |
---|---|
SpreadsheetWriter.SpreadsheetColumn |
addColumn(java.lang.String label)
Adds a column to the spreadsheet without assigning a group header to the
column
|
SpreadsheetWriter.SpreadsheetColumn |
addColumn(java.lang.String label,
java.lang.String groupHeader)
Adds a column to the spreadsheet.
|
SpreadsheetWriter.SpreadsheetField |
addEmptyField()
Adds an empty field
|
SpreadsheetWriter.SpreadsheetBoolField |
addField(boolean value)
Adds a boolean field
|
SpreadsheetWriter.SpreadsheetDateField |
addField(java.util.Date value)
Adds a date field
|
SpreadsheetWriter.SpreadsheetNumericField |
addField(double value)
Adds a fraction-value field
|
void |
addField(com.technia.tvc.core.gui.image.ImageURL imageURL)
Adds a field that holds an image.
|
SpreadsheetWriter.SpreadsheetIntField |
addField(int value)
Adds a boolean field
|
SpreadsheetWriter.SpreadsheetTextField |
addField(java.lang.String content)
Adds a string/text field
|
SpreadsheetWriter.SpreadsheetTextField |
addField(java.lang.String content,
boolean wrapText)
Adds a string/text field
|
SpreadsheetWriter.SpreadsheetFormulaField |
addFormula(java.lang.String formula)
Adds a field that holds a spreadsheet formula.
|
void |
beginRow()
Before adding fields, this method must be called (per row).
|
void |
endRow()
When all fields on a row has been added, this method is being called.
|
int |
getColumnCount() |
java.lang.String |
getFormat()
Returns a string representing the format of the generated spreadsheet.
|
void |
setAboveContent(SpreadsheetWriter.AdditionalSpreadsheetContent aboveContent)
Used to provide additional content added above the table data
|
void |
setBelowContent(SpreadsheetWriter.AdditionalSpreadsheetContent belowContent)
Used to provide additional content added below the table data.
|
java.lang.String getFormat()
int getColumnCount()
SpreadsheetWriter.SpreadsheetColumn addColumn(java.lang.String label)
label
- The label of the columnSpreadsheetWriter.SpreadsheetColumn
addColumn(String, String)
SpreadsheetWriter.SpreadsheetColumn addColumn(java.lang.String label, java.lang.String groupHeader)
Consecutive columns with the same group header will be grouped together.
label
- The labelgroupHeader
- The label of the group header (optional)SpreadsheetWriter.SpreadsheetColumn
void beginRow()
SpreadsheetWriter.SpreadsheetBoolField addField(boolean value)
value
- The value to addfield
that was added.SpreadsheetWriter.SpreadsheetIntField addField(int value)
value
- The value to addfield
that was added.SpreadsheetWriter.SpreadsheetNumericField addField(double value)
value
- The value to addfield
that was added.SpreadsheetWriter.SpreadsheetDateField addField(java.util.Date value)
value
- The value to addfield
that was added.SpreadsheetWriter.SpreadsheetField addEmptyField()
field
that was added.SpreadsheetWriter.SpreadsheetTextField addField(java.lang.String content)
content
- The content to addfield
that was added.SpreadsheetWriter.SpreadsheetTextField addField(java.lang.String content, boolean wrapText)
content
- The content to addwrapText
- If wrapping is allowed (note that this also can be
specified via the Style per field also)field
that was added.SpreadsheetWriter.SpreadsheetFormulaField addFormula(java.lang.String formula)
formula
- The formula.SpreadsheetWriter.SpreadsheetFormulaField
that were createdvoid addField(com.technia.tvc.core.gui.image.ImageURL imageURL)
Note: The image support far from perfect! There are some problems in Excel regarding support of different image formats + problems with image sizes vs cell sizes.
imageURL
- The image URL.void endRow()
void setAboveContent(SpreadsheetWriter.AdditionalSpreadsheetContent aboveContent)
aboveContent
- An SpreadsheetWriter.AdditionalSpreadsheetContent
void setBelowContent(SpreadsheetWriter.AdditionalSpreadsheetContent belowContent)
belowContent
- An SpreadsheetWriter.AdditionalSpreadsheetContent
Copyright © Technia AB. All Rights Reserved.