net.sf.jxls.util
Class Util
java.lang.Object
net.sf.jxls.util.Util
public final class Util
- extends java.lang.Object
This class contains many utility methods used by jXLS framework
- Author:
- Leonid Vysochyn, Vincent Dutat
|
Field Summary |
protected static org.apache.commons.logging.Log |
log
|
|
Constructor Summary |
Util()
|
|
Method Summary |
static void |
copyCell(org.apache.poi.hssf.usermodel.HSSFCell oldCell,
org.apache.poi.hssf.usermodel.HSSFCell newCell,
boolean copyStyle)
|
static void |
copyCell(org.apache.poi.hssf.usermodel.HSSFCell oldCell,
org.apache.poi.hssf.usermodel.HSSFCell newCell,
boolean copyStyle,
java.lang.String expressionToReplace,
java.lang.String expressionReplacement)
|
static void |
copyPageSetup(org.apache.poi.hssf.usermodel.HSSFSheet destSheet,
org.apache.poi.hssf.usermodel.HSSFSheet srcSheet)
|
static void |
copyPrintSetup(org.apache.poi.hssf.usermodel.HSSFSheet destSheet,
org.apache.poi.hssf.usermodel.HSSFSheet srcSheet)
|
static void |
copyRow(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
org.apache.poi.hssf.usermodel.HSSFRow oldRow,
org.apache.poi.hssf.usermodel.HSSFRow newRow)
|
static void |
copyRow(org.apache.poi.hssf.usermodel.HSSFSheet srcSheet,
org.apache.poi.hssf.usermodel.HSSFSheet destSheet,
org.apache.poi.hssf.usermodel.HSSFRow srcRow,
org.apache.poi.hssf.usermodel.HSSFRow destRow)
|
static void |
copyRow(org.apache.poi.hssf.usermodel.HSSFSheet srcSheet,
org.apache.poi.hssf.usermodel.HSSFSheet destSheet,
org.apache.poi.hssf.usermodel.HSSFRow srcRow,
org.apache.poi.hssf.usermodel.HSSFRow destRow,
java.lang.String expressionToReplace,
java.lang.String expressionReplacement)
|
static void |
copySheets(org.apache.poi.hssf.usermodel.HSSFSheet newSheet,
org.apache.poi.hssf.usermodel.HSSFSheet sheet)
|
static void |
copySheets(org.apache.poi.hssf.usermodel.HSSFSheet newSheet,
org.apache.poi.hssf.usermodel.HSSFSheet sheet,
java.lang.String expressionToReplace,
java.lang.String expressionReplacement)
|
static int |
duplicateRow(RowCollection rowCollection)
|
static void |
duplicateRowCollectionProperty(RowCollection rowCollection)
|
static org.apache.poi.hssf.usermodel.HSSFCellStyle |
duplicateStyle(org.apache.poi.hssf.usermodel.HSSFWorkbook workbook,
org.apache.poi.hssf.usermodel.HSSFCellStyle style)
Duplicates given HSSFCellStyle object |
static java.lang.String |
escapeAttributes(java.lang.String tag)
|
static org.apache.poi.hssf.util.Region |
getMergedRegion(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int rowNum,
short cellNum)
|
static java.lang.Object |
getProperty(java.lang.Object bean,
java.lang.String propertyName)
|
(package private) static short |
getWidth(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
short col)
|
static void |
prepareCollectionPropertyInRowForContentDuplication(RowCollection rowCollection)
|
static void |
prepareCollectionPropertyInRowForDuplication(RowCollection rowCollection,
java.lang.String collectionItemName)
|
static boolean |
removeMergedRegion(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int rowNum,
short cellNum)
|
static void |
removeRowCollectionPropertiesFromRow(RowCollection rowCollection)
|
static void |
setPrintArea(org.apache.poi.hssf.usermodel.HSSFWorkbook resultWorkbook,
int sheetNum)
|
static void |
shiftCellsLeft(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int startRow,
short startCol,
int endRow,
short endCol,
short shiftNumber)
|
static void |
shiftCellsRight(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int startRow,
int endRow,
short startCol,
short shiftNumber)
|
static void |
updateCellValue(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int rowNum,
short colNum,
java.lang.String cellValue)
|
static void |
writeToFile(java.lang.String fileName,
org.apache.poi.hssf.usermodel.HSSFWorkbook workbook)
Saves workbook to file |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static org.apache.commons.logging.Log log
Util
public Util()
removeRowCollectionPropertiesFromRow
public static void removeRowCollectionPropertiesFromRow(RowCollection rowCollection)
getMergedRegion
public static org.apache.poi.hssf.util.Region getMergedRegion(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int rowNum,
short cellNum)
removeMergedRegion
public static boolean removeMergedRegion(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int rowNum,
short cellNum)
prepareCollectionPropertyInRowForDuplication
public static void prepareCollectionPropertyInRowForDuplication(RowCollection rowCollection,
java.lang.String collectionItemName)
prepareCollectionPropertyInRowForContentDuplication
public static void prepareCollectionPropertyInRowForContentDuplication(RowCollection rowCollection)
duplicateRowCollectionProperty
public static void duplicateRowCollectionProperty(RowCollection rowCollection)
duplicateRow
public static int duplicateRow(RowCollection rowCollection)
copyRow
public static void copyRow(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
org.apache.poi.hssf.usermodel.HSSFRow oldRow,
org.apache.poi.hssf.usermodel.HSSFRow newRow)
copyRow
public static void copyRow(org.apache.poi.hssf.usermodel.HSSFSheet srcSheet,
org.apache.poi.hssf.usermodel.HSSFSheet destSheet,
org.apache.poi.hssf.usermodel.HSSFRow srcRow,
org.apache.poi.hssf.usermodel.HSSFRow destRow)
copyRow
public static void copyRow(org.apache.poi.hssf.usermodel.HSSFSheet srcSheet,
org.apache.poi.hssf.usermodel.HSSFSheet destSheet,
org.apache.poi.hssf.usermodel.HSSFRow srcRow,
org.apache.poi.hssf.usermodel.HSSFRow destRow,
java.lang.String expressionToReplace,
java.lang.String expressionReplacement)
copySheets
public static void copySheets(org.apache.poi.hssf.usermodel.HSSFSheet newSheet,
org.apache.poi.hssf.usermodel.HSSFSheet sheet)
copySheets
public static void copySheets(org.apache.poi.hssf.usermodel.HSSFSheet newSheet,
org.apache.poi.hssf.usermodel.HSSFSheet sheet,
java.lang.String expressionToReplace,
java.lang.String expressionReplacement)
copyCell
public static void copyCell(org.apache.poi.hssf.usermodel.HSSFCell oldCell,
org.apache.poi.hssf.usermodel.HSSFCell newCell,
boolean copyStyle)
copyCell
public static void copyCell(org.apache.poi.hssf.usermodel.HSSFCell oldCell,
org.apache.poi.hssf.usermodel.HSSFCell newCell,
boolean copyStyle,
java.lang.String expressionToReplace,
java.lang.String expressionReplacement)
getProperty
public static java.lang.Object getProperty(java.lang.Object bean,
java.lang.String propertyName)
writeToFile
public static void writeToFile(java.lang.String fileName,
org.apache.poi.hssf.usermodel.HSSFWorkbook workbook)
- Saves workbook to file
- Parameters:
fileName - - File name to save workbookworkbook - - Workbook to save
duplicateStyle
public static org.apache.poi.hssf.usermodel.HSSFCellStyle duplicateStyle(org.apache.poi.hssf.usermodel.HSSFWorkbook workbook,
org.apache.poi.hssf.usermodel.HSSFCellStyle style)
- Duplicates given HSSFCellStyle object
- Parameters:
workbook - - source HSSFWorkbook objectstyle - - HSSFCellStyle object to duplicate
- Returns:
- HSSFCellStyle
escapeAttributes
public static java.lang.String escapeAttributes(java.lang.String tag)
shiftCellsLeft
public static void shiftCellsLeft(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int startRow,
short startCol,
int endRow,
short endCol,
short shiftNumber)
getWidth
static short getWidth(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
short col)
shiftCellsRight
public static void shiftCellsRight(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int startRow,
int endRow,
short startCol,
short shiftNumber)
updateCellValue
public static void updateCellValue(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int rowNum,
short colNum,
java.lang.String cellValue)
copyPageSetup
public static void copyPageSetup(org.apache.poi.hssf.usermodel.HSSFSheet destSheet,
org.apache.poi.hssf.usermodel.HSSFSheet srcSheet)
copyPrintSetup
public static void copyPrintSetup(org.apache.poi.hssf.usermodel.HSSFSheet destSheet,
org.apache.poi.hssf.usermodel.HSSFSheet srcSheet)
setPrintArea
public static void setPrintArea(org.apache.poi.hssf.usermodel.HSSFWorkbook resultWorkbook,
int sheetNum)
Copyright 2005-2005-2007 jXLS Team. All Rights Reserved.