|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.ooffice.AbstractOfficeDocument
com.antelmann.ooffice.OOCalc
public class OOCalc
simplifies handling of OpenOffice spreadsheets This class implements ThirdParty for its use of OpenOffice libraries; see www.openoffice.org
Cell| Field Summary | |
|---|---|
static String |
CSV_FILTER
|
static int |
MAX_COLUMNS
|
static int |
MAX_ROWS
|
static String |
MS_EXCEL_FILTER
|
static String |
TIME_FORMAT
|
| Constructor Summary | |
|---|---|
OOCalc()
creates a visible blank new spreadsheet |
|
OOCalc(boolean hidden)
creates a blank new spreadsheet |
|
OOCalc(boolean previewMode,
File template)
|
|
OOCalc(File template)
creates a visible new document based on the given template file |
|
OOCalc(File template,
boolean hidden)
creates a new document based on the given template file |
|
OOCalc(File file,
Map<?,?> props)
loads a document (the given file) into a blank frame along with the given properties |
|
OOCalc(InputStream in,
boolean hidden)
|
|
OOCalc(InputStream in,
Map<?,?> props)
|
|
OOCalc(URL templateURL,
boolean hidden)
creates a new document based on the given template file |
|
OOCalc(com.sun.star.lang.XComponent comp)
|
|
OOCalc(com.sun.star.sheet.XSpreadsheetDocument document)
|
|
| Method Summary | |
|---|---|
TableModel |
asTableModel(int sheet,
int rowStart,
int columnStart,
int rowCount,
int columnCount,
boolean firstRowIsHeaderRow,
boolean useDisplayValue)
|
TableModel |
asTableModel(int sheet,
String namedRange,
boolean firstRowIsHeaderRow,
boolean useDisplayValue)
|
TableModel |
asTableModel(int sheet,
com.sun.star.table.XCellRange range,
boolean firstRowIsHeaderRow,
boolean useDisplayValue)
|
TableModel |
asTableModel(String sheet,
int rowStart,
int columnStart,
int rowCount,
int columnCount,
boolean firstRowIsHeaderRow,
boolean useDisplayValue)
provides a modifiable view of the sheet data as a TableModel; the model is directly backed by the sheet data |
TableModel |
asTableModel(String sheet,
String namedRange,
boolean firstRowIsHeaderRow,
boolean useDisplayValue)
|
TableModel |
asTableModel(String sheet,
com.sun.star.table.XCellRange range,
boolean firstRowIsHeaderRow,
boolean useDisplayValue)
|
void |
copy(com.sun.star.table.XCellRange source,
com.sun.star.table.XCell target)
|
void |
copySheet(String origin,
String target,
int index)
|
protected com.sun.star.table.TableBorder |
createBorder(CellBorder border)
|
void |
deleteColumn(com.sun.star.table.XCellRange range,
int count)
|
void |
deleteImage(com.sun.star.sheet.XSpreadsheet sheet,
String name)
|
void |
deleteRow(com.sun.star.table.XCellRange range,
int count)
|
Iterator<Cell> |
findTextCells(int sheet,
Filter<? super Cell> filter)
|
void |
formatCell(com.sun.star.table.XCell cell,
Font font)
|
void |
formatCell(com.sun.star.table.XCellRange range,
Font font)
|
void |
freezePosition(Cell.Location location)
|
static OOCalc |
getActiveDocument()
seeks the currently active document on the desktop (if any) and returns it |
int |
getActiveSheet()
|
Cell |
getCell(int sheetNo,
int row,
int column)
|
Cell |
getCell(int sheet,
String name)
|
Cell |
getCell(String namedRange)
|
Cell |
getCell(String sheet,
int row,
int column)
|
Cell |
getCell(String sheet,
String name)
|
Object |
getCellContent(com.sun.star.table.XCell cell)
|
Date |
getCellDate(Cell cell)
allows to interpret the contents of the given cell as a Date |
String |
getCellFormula(com.sun.star.table.XCell cell)
|
com.sun.star.table.XCellRange |
getCellRange(int sheet,
Rectangle cellRange)
|
com.sun.star.table.XCellRange |
getCellRange(int sheet,
String cellRangeName)
|
com.sun.star.table.XCellRange |
getCellRange(String namedRange)
|
com.sun.star.table.XCellRange |
getCellRange(String sheet,
String cellRangeName)
|
String |
getCellText(com.sun.star.table.XCell cell)
based on the unquoted formula |
double |
getCellValue(com.sun.star.table.XCell cell)
returns 0 if the cell doesn't have a numeric value |
Object |
getColumn(int sheet,
int column)
|
int |
getColumnFor(com.sun.star.table.XCell cell)
|
int |
getColumnWidth(int sheet,
int column)
|
String |
getDisplayValue(com.sun.star.table.XCell cell)
based on the formatted text that is displayed in the cell (as opposed to the formula or value) |
com.sun.star.sheet.XSpreadsheetDocument |
getDocument()
|
OODocType |
getDocumentType()
|
Cell |
getFirstCell(int sheetNo,
String cellRangeName)
returns the upper-left corner cell for the given range |
Cell |
getFirstCell(String sheet,
String cellRangeName)
returns the upper-left corner cell for the given range |
Cell |
getFirstSelectedCell()
|
Object |
getImageByName(com.sun.star.sheet.XSpreadsheet sheet,
String name)
|
String[] |
getImageNames(com.sun.star.sheet.XSpreadsheet sheet)
|
Cell |
getLastCellForRange(int sheetNo,
int startRow,
int startColumn,
int endRow,
int endColumn)
|
Cell |
getLastCellForRange(com.sun.star.sheet.XSpreadsheet sheet,
com.sun.star.table.XCellRange range)
|
String[] |
getNamedCellRanges()
|
Rectangle |
getPosition(com.sun.star.table.XCell cell)
provides the position in pixel |
Rectangle |
getPosition(com.sun.star.table.XCellRange range)
provides the position in pixel |
Object |
getRow(int sheet,
int row)
|
int |
getRowFor(com.sun.star.table.XCell cell)
|
int |
getRowHeight(int sheet,
int row)
|
com.sun.star.table.XCellRange |
getSelectedRange()
|
com.sun.star.sheet.XSpreadsheet |
getSheet(int index)
|
com.sun.star.sheet.XSpreadsheet |
getSheet(String name)
|
int |
getSheetFor(String namedRange)
|
int |
getSheetFor(com.sun.star.table.XCell cell)
|
int |
getSheetIndex(String sheetName)
|
String |
getSheetNameFor(com.sun.star.table.XCell cell)
|
String[] |
getSheetNames()
|
com.sun.star.lang.XComponent |
getXComponent()
|
void |
gotoEnd()
|
void |
insert(int sheet,
Rectangle cellRange,
Direction moveDirection)
|
void |
insert(com.sun.star.table.XCellRange range,
Direction moveDirection)
|
void |
insertColumn(com.sun.star.table.XCellRange range,
int count)
|
String |
insertImage(int sheet,
Image image,
Point point)
|
String |
insertImage(int sheet,
URL url,
Rectangle rectangle)
|
String |
insertImage(com.sun.star.sheet.XSpreadsheet sheet,
URL url,
Rectangle rectangle)
|
String |
insertImage(com.sun.star.sheet.XSpreadsheet sheet,
URL url,
Rectangle rectangle,
String name)
|
void |
insertNewSheet(String name,
int index)
|
void |
insertRow(com.sun.star.table.XCellRange range,
int count)
|
boolean |
isColumnVisible(int sheet,
int column)
|
boolean |
isEmpty(com.sun.star.table.XCell cell)
|
boolean |
isFormula(com.sun.star.table.XCell cell)
|
boolean |
isManualPageBreak(com.sun.star.table.XCell cell)
determines whether there has been a manual page break set for the row of the given cell. |
boolean |
isRowVisible(int sheet,
int row)
|
Iterator<Cell> |
iterateSelection()
|
ArrayList<Cell> |
listCells(com.sun.star.table.XCellRange range)
|
void |
move(com.sun.star.table.XCellRange source,
com.sun.star.table.XCell target)
|
void |
moveSheetToIndex(String name,
int index)
|
static OOCalc |
open(File file,
boolean readOnly,
boolean previewMode)
opens a document with the specified options |
static OOCalc |
openFile(File file)
opens a document for editing |
static OOCalc |
openFile(File file,
boolean hidden)
opens a document for editing |
static OOCalc |
openReadOnly(File file)
opens a document in read-only mode |
com.sun.star.table.XCellRange |
placeTableModel(TableModel model,
Cell.Location upperLeftCorner,
boolean includeHeader,
Monitor mon)
|
com.sun.star.table.XCellRange |
placeTableModel(TableModel model,
int sheet,
int row,
int column,
boolean includeHeader)
|
com.sun.star.table.XCellRange |
placeTableModel(TableModel model,
int sheet,
String range,
boolean includeHeader)
|
com.sun.star.table.XCellRange |
placeTableModel(TableModel model,
String sheet,
int row,
int column,
boolean includeHeader)
|
com.sun.star.table.XCellRange |
placeTableModel(TableModel model,
String sheet,
int row,
int column,
boolean includeHeader,
Monitor mon)
|
com.sun.star.table.XCellRange |
placeTableModel(TableModel model,
String sheet,
String range,
boolean includeHeader)
|
com.sun.star.table.XCellRange |
placeTableModel(TableModel model,
com.sun.star.table.XCell upperLeftCorner,
boolean includeHeader,
Monitor mon)
places the given model into the spreadsheet with the upper left corner at the given location |
void |
print(Map<?,?> printerProperties,
Map<?,?> jobProperties)
|
Cell |
relativeMove(com.sun.star.table.XCell cell,
Direction direction,
int count)
|
Cell |
relativeMove(com.sun.star.table.XCell cell,
int xOffset,
int yOffset)
|
void |
remove(int sheet,
Rectangle cellRange,
Direction moveDirection)
|
void |
remove(com.sun.star.table.XCellRange range,
Direction moveDirection)
|
void |
removeSheet(int index)
|
void |
removeSheet(String name)
|
void |
renameSheet(int index,
String newName)
|
void |
renameSheet(String oldName,
String newName)
|
void |
replace(com.sun.star.table.XCellRange range,
String search,
String replace)
|
void |
setCellAligment(com.sun.star.table.XCell cell,
ParagraphAlignment alignment)
|
void |
setCellBackground(com.sun.star.table.XCell cell,
Color color)
|
void |
setCellBorder(com.sun.star.table.XCell cell,
CellBorder border)
|
void |
setCellBorder(com.sun.star.table.XCellRange range,
CellBorder border)
|
void |
setCellDate(com.sun.star.table.XCell cell,
Date date)
|
void |
setCellDateTime(com.sun.star.table.XCell cell,
Date date)
|
void |
setCellFormat(com.sun.star.table.XCell cell,
Cell.Format format)
|
void |
setCellFormat(com.sun.star.table.XCell cell,
CharacterFormat option)
|
void |
setCellFormat(com.sun.star.table.XCellRange range,
Cell.Format format)
|
void |
setCellFormat(com.sun.star.table.XCell cell,
Underline option)
|
void |
setCellFormula(com.sun.star.table.XCell cell,
String formula)
|
void |
setCellProperty(com.sun.star.table.XCellRange range,
String key,
Object value)
|
void |
setCellProperty(com.sun.star.table.XCell cell,
String key,
Object value)
|
void |
setCellText(com.sun.star.table.XCell cell,
String text)
|
void |
setCellTextColor(com.sun.star.table.XCell cell,
Color color)
|
void |
setCellTime(com.sun.star.table.XCell cell,
Date date)
|
void |
setCellTime(com.sun.star.table.XCell cell,
long millis)
|
void |
setCellTime(com.sun.star.table.XCell cell,
TimeInDay time)
|
void |
setCellValue(com.sun.star.table.XCell cell,
double value)
|
void |
setCellValue(com.sun.star.table.XCell cell,
Number value,
String format)
cell, value and format must not be null |
void |
setCellValue(com.sun.star.table.XCell cell,
Object value)
makes a best effort to set the cell's value using an appropriate format |
void |
setCellValue(com.sun.star.table.XCell cell,
String value,
Cell.Format format)
cell, value and format must not be null |
void |
setColumnVisible(int sheet,
int column,
boolean visible)
|
void |
setColumnWidth(int sheet,
int column,
int width)
|
void |
setManualPageBreak(com.sun.star.table.XCell cell,
boolean flag)
#see isManualPageBreak(XCell) |
void |
setNumberFormat(com.sun.star.table.XCellRange range,
String numberFormatString)
|
void |
setNumberFormat(com.sun.star.table.XCell cell,
String numberFormatString)
|
void |
setOptimalColumnWidth(int sheet,
int column)
|
void |
setOptimalColumnWidth(com.sun.star.sheet.XSpreadsheet sheet,
int column)
|
boolean |
setProtection(com.sun.star.sheet.XSpreadsheet sheet,
String password,
boolean protect)
alters the protection of the given sheet |
void |
setRowHeight(int sheet,
int row,
int width)
|
void |
setRowVisible(int sheet,
int row,
boolean visible)
|
void |
setSelectedRange(String range)
|
static Date |
toDate(Number n)
|
static double |
toNumber(Date date)
|
| Methods inherited from class com.antelmann.ooffice.AbstractOfficeDocument |
|---|
addCloseListener, close, dispatchCommand, dispatchCommand, dispatchCommand, dispatchCommand, dispose, exportAsHTMLString, exportAsString, exportFormat, exportHTML, exportPDF, exportToHTML, exportToPDF, formatText, formatText, formatText, formatText, getController, getDocumentProperties, getFile, getFont, getHtmlFormat, getPdfFormat, getXFrame, print, print, print, print, query, save, setComponentVisible, setEnableComponent, setEnableFrame, setFrameVisible, setPageOrientation, setPropertyValue, storeTo, storeTo, storeTo, storeTo, storeTo, undo, updateAll |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String MS_EXCEL_FILTER
public static final String CSV_FILTER
public static final String TIME_FORMAT
public static final int MAX_COLUMNS
public static final int MAX_ROWS
| Constructor Detail |
|---|
public OOCalc()
throws OfficeException
OfficeException
public OOCalc(boolean hidden)
throws OfficeException
OfficeException
public OOCalc(File template)
throws OfficeException,
IOException
OfficeException
IOException
public OOCalc(boolean previewMode,
File template)
throws OfficeException,
IOException
OfficeException
IOException
public OOCalc(File template,
boolean hidden)
throws OfficeException,
IOException
OfficeException
IOException
public OOCalc(URL templateURL,
boolean hidden)
throws OfficeException,
IOException
OfficeException
IOException
public OOCalc(File file,
Map<?,?> props)
throws OfficeException,
IOException
OfficeException
IOException
public OOCalc(InputStream in,
boolean hidden)
throws OfficeException,
IOException
OfficeException
IOException
public OOCalc(InputStream in,
Map<?,?> props)
throws OfficeException,
IOException
OfficeException
IOException
public OOCalc(com.sun.star.lang.XComponent comp)
throws OfficeException
OfficeExceptionpublic OOCalc(com.sun.star.sheet.XSpreadsheetDocument document)
| Method Detail |
|---|
public static OOCalc getActiveDocument()
throws OfficeException
OfficeException
public static OOCalc openFile(File file)
throws OfficeException,
IOException
OfficeException
IOException
public static OOCalc openFile(File file,
boolean hidden)
throws OfficeException,
IOException
OfficeException
IOException
public static OOCalc openReadOnly(File file)
throws OfficeException,
IOException
OfficeException
IOException
public static OOCalc open(File file,
boolean readOnly,
boolean previewMode)
throws OfficeException,
IOException
OfficeException
IOExceptionpublic com.sun.star.sheet.XSpreadsheetDocument getDocument()
public com.sun.star.lang.XComponent getXComponent()
public String[] getSheetNames()
public int getSheetIndex(String sheetName)
public boolean setProtection(com.sun.star.sheet.XSpreadsheet sheet,
String password,
boolean protect)
throws IllegalArgumentException
sheet - the sheet to be alteredpassword - the password to be used for protection/unprotectionprotect - determines whether to protect or unprotect
IllegalArgumentException - if the password was incorrect for unprotection
public com.sun.star.sheet.XSpreadsheet getSheet(int index)
throws OfficeException
OfficeException
public com.sun.star.sheet.XSpreadsheet getSheet(String name)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentExceptionpublic int getActiveSheet()
public Cell getFirstSelectedCell()
public Iterator<Cell> iterateSelection()
public ArrayList<Cell> listCells(com.sun.star.table.XCellRange range)
throws OfficeException
OfficeException
public String[] getNamedCellRanges()
throws OfficeException
OfficeException
public int getSheetFor(String namedRange)
throws IllegalArgumentException,
OfficeException
IllegalArgumentException
OfficeException
public Cell getLastCellForRange(int sheetNo,
int startRow,
int startColumn,
int endRow,
int endColumn)
throws OfficeException
OfficeException
public Cell getLastCellForRange(com.sun.star.sheet.XSpreadsheet sheet,
com.sun.star.table.XCellRange range)
throws IndexOutOfBoundsException
IndexOutOfBoundsException
public Iterator<Cell> findTextCells(int sheet,
Filter<? super Cell> filter)
throws OfficeException
OfficeException
public void replace(com.sun.star.table.XCellRange range,
String search,
String replace)
public Object getColumn(int sheet,
int column)
throws IllegalArgumentException,
OfficeException
IllegalArgumentException
OfficeException
public Object getRow(int sheet,
int row)
throws IllegalArgumentException,
OfficeException
IllegalArgumentException
OfficeException
public int getColumnWidth(int sheet,
int column)
throws IllegalArgumentException,
OfficeException
IllegalArgumentException
OfficeException
public void setColumnWidth(int sheet,
int column,
int width)
throws IllegalArgumentException,
OfficeException
IllegalArgumentException
OfficeException
public void setOptimalColumnWidth(int sheet,
int column)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public void setOptimalColumnWidth(com.sun.star.sheet.XSpreadsheet sheet,
int column)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public boolean isColumnVisible(int sheet,
int column)
throws IllegalArgumentException,
OfficeException
IllegalArgumentException
OfficeException
public void setColumnVisible(int sheet,
int column,
boolean visible)
throws IllegalArgumentException,
OfficeException
IllegalArgumentException
OfficeException
public boolean isRowVisible(int sheet,
int row)
throws IllegalArgumentException,
OfficeException
IllegalArgumentException
OfficeException
public void setRowVisible(int sheet,
int row,
boolean visible)
throws IllegalArgumentException,
OfficeException
IllegalArgumentException
OfficeException
public int getRowHeight(int sheet,
int row)
throws IllegalArgumentException,
OfficeException
IllegalArgumentException
OfficeException
public void setRowHeight(int sheet,
int row,
int width)
throws IllegalArgumentException,
OfficeException
IllegalArgumentException
OfficeException
public boolean isManualPageBreak(com.sun.star.table.XCell cell)
throws OfficeException
OfficeExceptionsetManualPageBreak(XCell, boolean)
public void setManualPageBreak(com.sun.star.table.XCell cell,
boolean flag)
throws OfficeException
isManualPageBreak(XCell)
OfficeException
public Cell getCell(int sheetNo,
int row,
int column)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public Cell getCell(String sheet,
int row,
int column)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public Cell getCell(int sheet,
String name)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public Cell getCell(String namedRange)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public Cell getCell(String sheet,
String name)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public com.sun.star.table.XCellRange getCellRange(String namedRange)
throws IllegalArgumentException,
OfficeException
IllegalArgumentException
OfficeException
public com.sun.star.table.XCellRange getCellRange(int sheet,
String cellRangeName)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public com.sun.star.table.XCellRange getCellRange(String sheet,
String cellRangeName)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public com.sun.star.table.XCellRange getCellRange(int sheet,
Rectangle cellRange)
throws OfficeException,
IndexOutOfBoundsException
OfficeException
IndexOutOfBoundsException
public Cell getFirstCell(String sheet,
String cellRangeName)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public Cell getFirstCell(int sheetNo,
String cellRangeName)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentExceptionpublic com.sun.star.table.XCellRange getSelectedRange()
public void setSelectedRange(String range)
throws OfficeException
OfficeException
public void gotoEnd()
throws OfficeException
OfficeException
public void insertRow(com.sun.star.table.XCellRange range,
int count)
public void insertColumn(com.sun.star.table.XCellRange range,
int count)
public void deleteRow(com.sun.star.table.XCellRange range,
int count)
public void deleteColumn(com.sun.star.table.XCellRange range,
int count)
public void copy(com.sun.star.table.XCellRange source,
com.sun.star.table.XCell target)
throws OfficeException
OfficeException
public void move(com.sun.star.table.XCellRange source,
com.sun.star.table.XCell target)
throws OfficeException
OfficeException
public void remove(int sheet,
Rectangle cellRange,
Direction moveDirection)
throws OfficeException
OfficeException
public void remove(com.sun.star.table.XCellRange range,
Direction moveDirection)
throws OfficeException
OfficeException
public void insert(int sheet,
Rectangle cellRange,
Direction moveDirection)
throws OfficeException
OfficeException
public void insert(com.sun.star.table.XCellRange range,
Direction moveDirection)
throws OfficeException
OfficeException
public void setCellValue(com.sun.star.table.XCell cell,
double value)
public void setCellFormula(com.sun.star.table.XCell cell,
String formula)
public void setCellDate(com.sun.star.table.XCell cell,
Date date)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public void setCellTime(com.sun.star.table.XCell cell,
long millis)
throws OfficeException
OfficeException
public void setCellTime(com.sun.star.table.XCell cell,
TimeInDay time)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public void setCellTime(com.sun.star.table.XCell cell,
Date date)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public void setCellDateTime(com.sun.star.table.XCell cell,
Date date)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public void setCellText(com.sun.star.table.XCell cell,
String text)
throws OfficeException
OfficeExceptionpublic String getDisplayValue(com.sun.star.table.XCell cell)
public boolean isEmpty(com.sun.star.table.XCell cell)
public String getCellText(com.sun.star.table.XCell cell)
public double getCellValue(com.sun.star.table.XCell cell)
public Object getCellContent(com.sun.star.table.XCell cell)
public String getCellFormula(com.sun.star.table.XCell cell)
public boolean isFormula(com.sun.star.table.XCell cell)
public void setCellValue(com.sun.star.table.XCell cell,
Object value)
throws OfficeException
OfficeException
public void setCellValue(com.sun.star.table.XCell cell,
Number value,
String format)
throws OfficeException
OfficeException
public void setCellValue(com.sun.star.table.XCell cell,
String value,
Cell.Format format)
throws OfficeException
OfficeException
public void setCellTextColor(com.sun.star.table.XCell cell,
Color color)
throws OfficeException
OfficeException
public void formatCell(com.sun.star.table.XCell cell,
Font font)
throws OfficeException
OfficeException
public void formatCell(com.sun.star.table.XCellRange range,
Font font)
throws OfficeException
OfficeException
public void setCellFormat(com.sun.star.table.XCell cell,
Cell.Format format)
throws OfficeException
OfficeExceptionCell.Format.applyTo(OOCalc, Object, Locale)
public void setCellFormat(com.sun.star.table.XCellRange range,
Cell.Format format)
throws OfficeException
OfficeExceptionCell.Format.applyTo(OOCalc, Object, Locale)
public void setNumberFormat(com.sun.star.table.XCellRange range,
String numberFormatString)
throws OfficeException
OfficeException
public void setNumberFormat(com.sun.star.table.XCell cell,
String numberFormatString)
throws OfficeException
OfficeException
public void setCellBackground(com.sun.star.table.XCell cell,
Color color)
throws OfficeException
OfficeException
public void setCellAligment(com.sun.star.table.XCell cell,
ParagraphAlignment alignment)
throws OfficeException
OfficeException
public void setCellFormat(com.sun.star.table.XCell cell,
Underline option)
throws OfficeException
OfficeException
public void setCellFormat(com.sun.star.table.XCell cell,
CharacterFormat option)
throws OfficeException
OfficeException
public void setCellBorder(com.sun.star.table.XCellRange range,
CellBorder border)
throws OfficeException
OfficeException
public void setCellBorder(com.sun.star.table.XCell cell,
CellBorder border)
throws OfficeException
OfficeExceptionprotected com.sun.star.table.TableBorder createBorder(CellBorder border)
public void setCellProperty(com.sun.star.table.XCell cell,
String key,
Object value)
throws OfficeException
OfficeException
public void setCellProperty(com.sun.star.table.XCellRange range,
String key,
Object value)
throws OfficeException
OfficeExceptionpublic Date getCellDate(Cell cell)
public static Date toDate(Number n)
public static double toNumber(Date date)
public String getSheetNameFor(com.sun.star.table.XCell cell)
public Cell relativeMove(com.sun.star.table.XCell cell,
Direction direction,
int count)
throws OfficeException
OfficeException
public Cell relativeMove(com.sun.star.table.XCell cell,
int xOffset,
int yOffset)
throws OfficeException
OfficeException
public com.sun.star.table.XCellRange placeTableModel(TableModel model,
int sheet,
int row,
int column,
boolean includeHeader)
throws OfficeException
OfficeException
public com.sun.star.table.XCellRange placeTableModel(TableModel model,
String sheet,
int row,
int column,
boolean includeHeader)
throws OfficeException
OfficeException
public com.sun.star.table.XCellRange placeTableModel(TableModel model,
String sheet,
String range,
boolean includeHeader)
throws OfficeException
OfficeException
public com.sun.star.table.XCellRange placeTableModel(TableModel model,
int sheet,
String range,
boolean includeHeader)
throws OfficeException
OfficeException
public com.sun.star.table.XCellRange placeTableModel(TableModel model,
String sheet,
int row,
int column,
boolean includeHeader,
Monitor mon)
throws OfficeException
OfficeException
public com.sun.star.table.XCellRange placeTableModel(TableModel model,
Cell.Location upperLeftCorner,
boolean includeHeader,
Monitor mon)
throws OfficeException,
CancellationWarning
OfficeException
CancellationWarning
public com.sun.star.table.XCellRange placeTableModel(TableModel model,
com.sun.star.table.XCell upperLeftCorner,
boolean includeHeader,
Monitor mon)
throws OfficeException,
CancellationWarning
OfficeException
CancellationWarning
public void freezePosition(Cell.Location location)
throws IllegalArgumentException,
OfficeException
IllegalArgumentException
OfficeExceptionpublic int getRowFor(com.sun.star.table.XCell cell)
public int getColumnFor(com.sun.star.table.XCell cell)
public int getSheetFor(com.sun.star.table.XCell cell)
public TableModel asTableModel(int sheet,
String namedRange,
boolean firstRowIsHeaderRow,
boolean useDisplayValue)
throws IllegalArgumentException,
OfficeException
IllegalArgumentException
OfficeException
public TableModel asTableModel(String sheet,
String namedRange,
boolean firstRowIsHeaderRow,
boolean useDisplayValue)
throws IllegalArgumentException,
OfficeException
IllegalArgumentException
OfficeException
public TableModel asTableModel(int sheet,
com.sun.star.table.XCellRange range,
boolean firstRowIsHeaderRow,
boolean useDisplayValue)
throws IllegalArgumentException,
OfficeException
IllegalArgumentException
OfficeException
public TableModel asTableModel(String sheet,
com.sun.star.table.XCellRange range,
boolean firstRowIsHeaderRow,
boolean useDisplayValue)
throws IllegalArgumentException,
OfficeException
IllegalArgumentException
OfficeException
public TableModel asTableModel(int sheet,
int rowStart,
int columnStart,
int rowCount,
int columnCount,
boolean firstRowIsHeaderRow,
boolean useDisplayValue)
public TableModel asTableModel(String sheet,
int rowStart,
int columnStart,
int rowCount,
int columnCount,
boolean firstRowIsHeaderRow,
boolean useDisplayValue)
useDisplayValue - if true, TableModel.getValueAt(int, int)
uses getDisplayValue(XCell), otherwise getCellContent(XCell)TableModelCopy
public Rectangle getPosition(com.sun.star.table.XCellRange range)
throws OfficeException
OfficeException
public Rectangle getPosition(com.sun.star.table.XCell cell)
throws OfficeException
OfficeException
@Warning(value="a temporary file that is created here cannot be deleted until OpenOffice has shut down, unfortunately")
public String insertImage(int sheet,
Image image,
Point point)
throws IOException,
OfficeException
IOException
OfficeException
public String insertImage(int sheet,
URL url,
Rectangle rectangle)
throws IOException,
OfficeException
IOException
OfficeException
public String insertImage(com.sun.star.sheet.XSpreadsheet sheet,
URL url,
Rectangle rectangle)
throws IOException,
OfficeException
IOException
OfficeException
public String insertImage(com.sun.star.sheet.XSpreadsheet sheet,
URL url,
Rectangle rectangle,
String name)
throws IOException,
OfficeException
IOException
OfficeException
public String[] getImageNames(com.sun.star.sheet.XSpreadsheet sheet)
throws OfficeException
OfficeException
public Object getImageByName(com.sun.star.sheet.XSpreadsheet sheet,
String name)
throws OfficeException
OfficeException
public void deleteImage(com.sun.star.sheet.XSpreadsheet sheet,
String name)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public void renameSheet(int index,
String newName)
throws IllegalArgumentException,
OfficeException
IllegalArgumentException
OfficeException
public void renameSheet(String oldName,
String newName)
throws IllegalArgumentException,
OfficeException
IllegalArgumentException
OfficeException
public void copySheet(String origin,
String target,
int index)
public void moveSheetToIndex(String name,
int index)
public void insertNewSheet(String name,
int index)
public void removeSheet(int index)
throws OfficeException
OfficeException
public void removeSheet(String name)
throws OfficeException
OfficeExceptionpublic OODocType getDocumentType()
@Todo(value="doesn\'t work for new documents that are hidden")
public void print(Map<?,?> printerProperties,
Map<?,?> jobProperties)
throws IllegalArgumentException
print in interface OfficeDocumentprint in class AbstractOfficeDocumentIllegalArgumentException
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||