Android Programming Press on the image to return to the main documentation page.

Excel

List of types:

ReadableSheet
ReadableWorkbook
WritableCell
WritableCellFormat
WritableSheet
WritableWorkbook

ReadableSheet


Events:

None

Members:


  ColumnsCount As Int [read only]

  GetCellValue (Col As Int, Row As Int) As String

  IsInitialized As Boolean

  Name As String [read only]

  RowsCount As Int [read only]

Members description:

ColumnsCount As Int [read only]
Returns the number of columns.
GetCellValue (Col As Int, Row As Int) As String
Returns the string value of the cell at the given column and row.
(0, 0) is equivalent to A0.
(0, 1) is equivalent to A1.
(1, 0) is equivalent to B0.
IsInitialized As Boolean
Name As String [read only]
Gets the sheet's name.
RowsCount As Int [read only]
Returns the number of rows.

ReadableWorkbook

This library wraps the open source jexcel project. It allows reading and writing Microsoft Excel files.
See the tutorial in the forum for more information.

Events:

None

Members:


  Close

  Encoding As String

  GetSheet (Index As Int) As ReadableSheet

  GetSheetNames As String()

  Initialize (Dir As String, FileName As String)

  IsInitialized As Boolean

  NumberOfSheets As Int [read only]

Members description:

Close
Closes the workbook.
Encoding As String
Gets or sets the encoding. Must be set before Initialize is called.
GetSheet (Index As Int) As ReadableSheet
Gets the sheet at the specified index (first sheet is at index 0).
GetSheetNames As String()
Returns an array with the sheets names.
Initialize (Dir As String, FileName As String)
Opens the given workbook in read-only mode.
IsInitialized As Boolean
NumberOfSheets As Int [read only]
Returns the number of sheets.

WritableCell


Events:

None

Members:


  InitializeFormula (Col As Int, Row As Int, Formula As String)

  InitializeNumber (Col As Int, Row As Int, Value As Double)

  InitializeText (Col As Int, Row As Int, Value As String)

  IsInitialized As Boolean

  SetCellFormat (CellFormat As WritableCellFormat)

Members description:

InitializeFormula (Col As Int, Row As Int, Formula As String)
Creates a new WritableCell in the given coordinates and formula.
Call WritableSheet.AddCell to add it to the sheet.

cell.InitializeFormula(0, 1, "34 + 34")
sheet1.AddCell(cell)
InitializeNumber (Col As Int, Row As Int, Value As Double)
Creates a new WritableCell in the given coordinates and number value.
Call WritableSheet.AddCell to add it to the sheet.
InitializeText (Col As Int, Row As Int, Value As String)
Creates a new WritableCell in the given coordinates and text value.
Call WritableSheet.AddCell to add it to the sheet.
IsInitialized As Boolean
SetCellFormat (CellFormat As WritableCellFormat)
Sets the cell format. Note that you can use the same WritableCellFormat for multiple cells.

WritableCellFormat


Events:

None

Members:


  BackgroundColor As jxl.format.Colour [write only]

  BORDER_ALL As jxl.format.Border

  BORDER_BOTTOM As jxl.format.Border

  BORDER_LEFT As jxl.format.Border

  BORDER_NONE As jxl.format.Border

  BORDER_RIGHT As jxl.format.Border

  BORDER_STYLE_DASH_DOT As jxl.format.BorderLineStyle

  BORDER_STYLE_DASH_DOT_DOT As jxl.format.BorderLineStyle

  BORDER_STYLE_DASHED As jxl.format.BorderLineStyle

  BORDER_STYLE_DOTTED As jxl.format.BorderLineStyle

  BORDER_STYLE_DOUBLE As jxl.format.BorderLineStyle

  BORDER_STYLE_HAIR As jxl.format.BorderLineStyle

  BORDER_STYLE_MEDIUM As jxl.format.BorderLineStyle

  BORDER_STYLE_MEDIUM_DASH_DOT As jxl.format.BorderLineStyle

  BORDER_STYLE_MEDIUM_DASH_DOT_DOT As jxl.format.BorderLineStyle

  BORDER_STYLE_MEDIUM_DASHED As jxl.format.BorderLineStyle

  BORDER_STYLE_NONE As jxl.format.BorderLineStyle

  BORDER_STYLE_SLANTED_DASH_DOT As jxl.format.BorderLineStyle

  BORDER_STYLE_THICK As jxl.format.BorderLineStyle

  BORDER_STYLE_THIN As jxl.format.BorderLineStyle

  BORDER_TOP As jxl.format.Border

  COLOR_AQUA As jxl.format.Colour

  COLOR_AUTOMATIC As jxl.format.Colour

  COLOR_BLACK As jxl.format.Colour

  COLOR_BLUE As jxl.format.Colour

  COLOR_BLUE_GREY As jxl.format.Colour

  COLOR_BLUE2 As jxl.format.Colour

  COLOR_BRIGHT_GREEN As jxl.format.Colour

  COLOR_BROWN As jxl.format.Colour

  COLOR_CORAL As jxl.format.Colour

  COLOR_DARK_BLUE As jxl.format.Colour

  COLOR_DARK_BLUE2 As jxl.format.Colour

  COLOR_DARK_GREEN As jxl.format.Colour

  COLOR_DARK_PURPLE As jxl.format.Colour

  COLOR_DARK_RED As jxl.format.Colour

  COLOR_DARK_RED2 As jxl.format.Colour

  COLOR_DARK_TEAL As jxl.format.Colour

  COLOR_DARK_YELLOW As jxl.format.Colour

  COLOR_GOLD As jxl.format.Colour

  COLOR_GREEN As jxl.format.Colour

  COLOR_GREY_25_PERCENT As jxl.format.Colour

  COLOR_GREY_40_PERCENT As jxl.format.Colour

  COLOR_GREY_50_PERCENT As jxl.format.Colour

  COLOR_GREY_80_PERCENT As jxl.format.Colour

  COLOR_ICE_BLUE As jxl.format.Colour

  COLOR_INDIGO As jxl.format.Colour

  COLOR_IVORY As jxl.format.Colour

  COLOR_LAVENDER As jxl.format.Colour

  COLOR_LIGHT_BLUE As jxl.format.Colour

  COLOR_LIGHT_GREEN As jxl.format.Colour

  COLOR_LIGHT_ORANGE As jxl.format.Colour

  COLOR_LIGHT_TURQUOISE As jxl.format.Colour

  COLOR_LIGHT_TURQUOISE2 As jxl.format.Colour

  COLOR_LIME As jxl.format.Colour

  COLOR_OCEAN_BLUE As jxl.format.Colour

  COLOR_OLIVE_GREEN As jxl.format.Colour

  COLOR_ORANGE As jxl.format.Colour

  COLOR_PALE_BLUE As jxl.format.Colour

  COLOR_PERIWINKLE As jxl.format.Colour

  COLOR_PINK As jxl.format.Colour

  COLOR_PINK2 As jxl.format.Colour

  COLOR_PLUM As jxl.format.Colour

  COLOR_PLUM2 As jxl.format.Colour

  COLOR_RED As jxl.format.Colour

  COLOR_ROSE As jxl.format.Colour

  COLOR_SEA_GREEN As jxl.format.Colour

  COLOR_SKY_BLUE As jxl.format.Colour

  COLOR_TAN As jxl.format.Colour

  COLOR_TEAL As jxl.format.Colour

  COLOR_TEAL2 As jxl.format.Colour

  COLOR_TURQOISE2 As jxl.format.Colour

  COLOR_TURQUOISE As jxl.format.Colour

  COLOR_UNKNOWN As jxl.format.Colour

  COLOR_VERY_LIGHT_YELLOW As jxl.format.Colour

  COLOR_VIOLET As jxl.format.Colour

  COLOR_VIOLET2 As jxl.format.Colour

  COLOR_WHITE As jxl.format.Colour

  COLOR_YELLOW2 As jxl.format.Colour

  FONT_ARIAL As jxl.write.WritableFont.FontName

  FONT_COURIER As jxl.write.WritableFont.FontName

  FONT_TAHOMA As jxl.write.WritableFont.FontName

  FONT_TIMES As jxl.write.WritableFont.FontName

  HALIGN_CENTRE As jxl.format.Alignment

  HALIGN_FILL As jxl.format.Alignment

  HALIGN_GENERAL As jxl.format.Alignment

  HALIGN_JUSTIFY As jxl.format.Alignment

  HALIGN_LEFT As jxl.format.Alignment

  HALIGN_RIGHT As jxl.format.Alignment

  HorizontalAlignment As jxl.format.Alignment [write only]

  Initialize

  Initialize2 (Font As jxl.write.WritableFont.FontName, FontSize As Int, Bold As Boolean, Underline As Boolean, Italic As Boolean, FontColor As jxl.format.Colour)

  IsInitialized As Boolean

  SetBorder (Border As jxl.format.Border, Style As jxl.format.BorderLineStyle, BorderColor As jxl.format.Colour)

  VALIGN_BOTTOM As jxl.format.VerticalAlignment

  VALIGN_CENTRE As jxl.format.VerticalAlignment

  VALIGN_JUSTIFY As jxl.format.VerticalAlignment

  VALIGN_TOP As jxl.format.VerticalAlignment

  VertivalAlignment As jxl.format.VerticalAlignment [write only]

Members description:

BackgroundColor As jxl.format.Colour [write only]
Sets the cell's background color. The color should be one of the COLOR constants.
BORDER_ALL As jxl.format.Border
BORDER_BOTTOM As jxl.format.Border
BORDER_LEFT As jxl.format.Border
BORDER_NONE As jxl.format.Border
BORDER_RIGHT As jxl.format.Border
BORDER_STYLE_DASH_DOT As jxl.format.BorderLineStyle
BORDER_STYLE_DASH_DOT_DOT As jxl.format.BorderLineStyle
BORDER_STYLE_DASHED As jxl.format.BorderLineStyle
BORDER_STYLE_DOTTED As jxl.format.BorderLineStyle
BORDER_STYLE_DOUBLE As jxl.format.BorderLineStyle
BORDER_STYLE_HAIR As jxl.format.BorderLineStyle
BORDER_STYLE_MEDIUM As jxl.format.BorderLineStyle
BORDER_STYLE_MEDIUM_DASH_DOT As jxl.format.BorderLineStyle
BORDER_STYLE_MEDIUM_DASH_DOT_DOT As jxl.format.BorderLineStyle
BORDER_STYLE_MEDIUM_DASHED As jxl.format.BorderLineStyle
BORDER_STYLE_NONE As jxl.format.BorderLineStyle
BORDER_STYLE_SLANTED_DASH_DOT As jxl.format.BorderLineStyle
BORDER_STYLE_THICK As jxl.format.BorderLineStyle
BORDER_STYLE_THIN As jxl.format.BorderLineStyle
BORDER_TOP As jxl.format.Border
COLOR_AQUA As jxl.format.Colour
COLOR_AUTOMATIC As jxl.format.Colour
COLOR_BLACK As jxl.format.Colour
COLOR_BLUE As jxl.format.Colour
COLOR_BLUE_GREY As jxl.format.Colour
COLOR_BLUE2 As jxl.format.Colour
COLOR_BRIGHT_GREEN As jxl.format.Colour
COLOR_BROWN As jxl.format.Colour
COLOR_CORAL As jxl.format.Colour
COLOR_DARK_BLUE As jxl.format.Colour
COLOR_DARK_BLUE2 As jxl.format.Colour
COLOR_DARK_GREEN As jxl.format.Colour
COLOR_DARK_PURPLE As jxl.format.Colour
COLOR_DARK_RED As jxl.format.Colour
COLOR_DARK_RED2 As jxl.format.Colour
COLOR_DARK_TEAL As jxl.format.Colour
COLOR_DARK_YELLOW As jxl.format.Colour
COLOR_GOLD As jxl.format.Colour
COLOR_GREEN As jxl.format.Colour
COLOR_GREY_25_PERCENT As jxl.format.Colour
COLOR_GREY_40_PERCENT As jxl.format.Colour
COLOR_GREY_50_PERCENT As jxl.format.Colour
COLOR_GREY_80_PERCENT As jxl.format.Colour
COLOR_ICE_BLUE As jxl.format.Colour
COLOR_INDIGO As jxl.format.Colour
COLOR_IVORY As jxl.format.Colour
COLOR_LAVENDER As jxl.format.Colour
COLOR_LIGHT_BLUE As jxl.format.Colour
COLOR_LIGHT_GREEN As jxl.format.Colour
COLOR_LIGHT_ORANGE As jxl.format.Colour
COLOR_LIGHT_TURQUOISE As jxl.format.Colour
COLOR_LIGHT_TURQUOISE2 As jxl.format.Colour
COLOR_LIME As jxl.format.Colour
COLOR_OCEAN_BLUE As jxl.format.Colour
COLOR_OLIVE_GREEN As jxl.format.Colour
COLOR_ORANGE As jxl.format.Colour
COLOR_PALE_BLUE As jxl.format.Colour
COLOR_PERIWINKLE As jxl.format.Colour
COLOR_PINK As jxl.format.Colour
COLOR_PINK2 As jxl.format.Colour
COLOR_PLUM As jxl.format.Colour
COLOR_PLUM2 As jxl.format.Colour
COLOR_RED As jxl.format.Colour
COLOR_ROSE As jxl.format.Colour
COLOR_SEA_GREEN As jxl.format.Colour
COLOR_SKY_BLUE As jxl.format.Colour
COLOR_TAN As jxl.format.Colour
COLOR_TEAL As jxl.format.Colour
COLOR_TEAL2 As jxl.format.Colour
COLOR_TURQOISE2 As jxl.format.Colour
COLOR_TURQUOISE As jxl.format.Colour
COLOR_UNKNOWN As jxl.format.Colour
COLOR_VERY_LIGHT_YELLOW As jxl.format.Colour
COLOR_VIOLET As jxl.format.Colour
COLOR_VIOLET2 As jxl.format.Colour
COLOR_WHITE As jxl.format.Colour
COLOR_YELLOW2 As jxl.format.Colour
FONT_ARIAL As jxl.write.WritableFont.FontName
FONT_COURIER As jxl.write.WritableFont.FontName
FONT_TAHOMA As jxl.write.WritableFont.FontName
FONT_TIMES As jxl.write.WritableFont.FontName
HALIGN_CENTRE As jxl.format.Alignment
HALIGN_FILL As jxl.format.Alignment
HALIGN_GENERAL As jxl.format.Alignment
HALIGN_JUSTIFY As jxl.format.Alignment
HALIGN_LEFT As jxl.format.Alignment
HALIGN_RIGHT As jxl.format.Alignment
HorizontalAlignment As jxl.format.Alignment [write only]
Sets the cell's horizontal alignment. The value should be one of the HALIGN constants.
Initialize
Creates a new WritableCellFormat with the default settings.
Initialize2 (Font As jxl.write.WritableFont.FontName, FontSize As Int, Bold As Boolean, Underline As Boolean, Italic As Boolean, FontColor As jxl.format.Colour)
Creates a new WritableCellFormat with the specified font style.
Font - One of the FONT constants.
FontSize - Default value is 10.
Bold - Whether the text should be bold.
Underline - Whether the text should be underlined.
Italic - Whether the text style should be italic.
FontColor - One of the COLOR constants.
IsInitialized As Boolean
SetBorder (Border As jxl.format.Border, Style As jxl.format.BorderLineStyle, BorderColor As jxl.format.Colour)
Sets the cell's border.
Border - One of the BORDER constants.
Style - One of the BORDER_STYLE constants.
BorderColor - One of the COLOR constants.
VALIGN_BOTTOM As jxl.format.VerticalAlignment
VALIGN_CENTRE As jxl.format.VerticalAlignment
VALIGN_JUSTIFY As jxl.format.VerticalAlignment
VALIGN_TOP As jxl.format.VerticalAlignment
VertivalAlignment As jxl.format.VerticalAlignment [write only]
Sets the cell's vertical alignment. The value should be one of the VALIGN constants.

WritableSheet


Events:

None

Members:


  AddCell (Cell As jxl.write.WritableCell)

  ColumnsCount As Int [read only]

  GetCellValue (Col As Int, Row As Int) As String

  IsInitialized As Boolean

  Name As String

  RowsCount As Int [read only]

  SetColumnWidth (Col As Int, Width As Int)

  SetRowHeight (Row As Int, Height As Float)

Members description:

AddCell (Cell As jxl.write.WritableCell)
Adds a new cell to the sheet.
ColumnsCount As Int [read only]
Returns the number of columns.
GetCellValue (Col As Int, Row As Int) As String
Returns the string value of the cell at the given column and row.
(0, 0) is equivalent to A0.
(0, 1) is equivalent to A1.
(1, 0) is equivalent to B0.
IsInitialized As Boolean
Name As String
Gets the sheet's name.
RowsCount As Int [read only]
Returns the number of rows.
SetColumnWidth (Col As Int, Width As Int)
SetRowHeight (Row As Int, Height As Float)

WritableWorkbook


Events:

None

Members:


  AddSheet (Name As String, Index As Int) As WritableSheet

  Close

  Encoding As String

  GetSheet (Index As Int) As WritableSheet

  GetSheetNames As String()

  Initialize (Dir As String, FileName As String)

  Initialize2 (Dir As String, FileName As String, Workbook As jxl.Workbook)

  IsInitialized As Boolean

  NumberOfSheets As Int [read only]

  RemoveSheet (Index As Int)

  Write

Members description:

AddSheet (Name As String, Index As Int) As WritableSheet
Adds a new sheet with the given name and at the specific index.
Close
Closes the workbook.
Encoding As String
Gets or sets the encoding. Must be set before Initialize is called.
GetSheet (Index As Int) As WritableSheet
Gets the sheet at the specified index (first sheet is at index 0).
GetSheetNames As String()
Returns an array with the sheets names.
Initialize (Dir As String, FileName As String)
Initializes the output file. The output file will be deleted if it already exists.
Initialize2 (Dir As String, FileName As String, Workbook As jxl.Workbook)
Initializes the output file and creates a copy of the given workbook.
The output file will be deleted if it already exists.
IsInitialized As Boolean
NumberOfSheets As Int [read only]
Returns the number of sheets.
RemoveSheet (Index As Int)
Removes the sheet at the given index.
Write
Writes the data to the disk.
Top