public class CellsHelper
Property Getters/Setters Summary | ||
---|---|---|
static java.lang.String | getAltStartPath() | |
staticvoid | setAltStartPath(java.lang.Stringvalue) | |
Gets or sets the alternate startup path, which is referred to by some external formula references. | ||
static CustomImplementationFactory | getCustomImplementationFactory() | |
staticvoid | ||
Gets or sets the factory for creating instances with special implementation. | ||
static double | getDPI() | |
staticvoid | setDPI(doublevalue) | |
Gets the DPI of the machine. | ||
static java.lang.String | getFontDir() | |
staticvoid | setFontDir(java.lang.Stringvalue) | |
When generating PDF/XPS, specific font file directory can be set in the property. If it is not set , using %WINDOWS%\fonts by default. | ||
static java.util.ArrayList | getFontDirs() | |
staticvoid | setFontDirs(java.util.ArrayListvalue) | |
When generating PDF/XPS, specific font file directories can be set in the property. If it is not set , using %WINDOWS%\fonts by default. | ||
static java.util.ArrayList | getFontFiles() | |
staticvoid | setFontFiles(java.util.ArrayListvalue) | |
When generating PDF/XPS, specific font files can be set in the property. Such as "d:\myfonts\myArial.ttf" | ||
static java.lang.String | getLibraryPath() | |
staticvoid | setLibraryPath(java.lang.Stringvalue) | |
Gets or sets the library path which is referred to by some external formula references. | ||
static int | getSignificantDigits() | |
staticvoid | setSignificantDigits(intvalue) | |
Gets and sets the number of significant digits. The default value is 17. | ||
static java.lang.String | getStartupPath() | |
staticvoid | setStartupPath(java.lang.Stringvalue) | |
Gets or sets the startup path, which is referred to by some external formula references. |
Method Summary | ||
---|---|---|
static void | addAddInFunction(java.lang.String function, int minCountOfParameters, int maxCountOfParameters, int[] paramersType, int functionValueType) | |
Add addin function.
|
||
static java.lang.String | cellIndexToName(int row, int column) | |
Gets cell name according to its row and column indexes.
|
||
static int[] | cellNameToIndex(java.lang.String cellName) | |
static java.lang.String | columnIndexToName(int column) | |
Gets column name according to column index.
|
||
static int | columnNameToIndex(java.lang.String columnName) | |
Gets column index according to column name.
|
||
static java.lang.String | convertA1FormulaToR1C1(java.lang.String formula, int row, int column) | |
Converts A1 formula of the cell to the r1c1 formula.
|
||
static java.lang.String | convertR1C1FormulaToA1(java.lang.String r1c1Formula, int row, int column) | |
Converts the r1c1 formula of the cell to A1 formula.
|
||
static java.lang.String | createSafeSheetName(java.lang.String nameProposal) | |
Checks given sheet name and create a valid one when needed.
If given sheet name conforms to the rules of excel sheet name, then return it.
Otherwise string will be truncated if length exceeds the limit
and invalid characters will be replaced with ' ', then return the rebuilt string value.
|
||
static java.lang.String | createSafeSheetName(java.lang.String nameProposal, char replaceChar) | |
Checks given sheet name and create a valid one when needed.
If given sheet name conforms to the rules of excel sheet name, then return it.
Otherwise string will be truncated if length exceeds the limit
and invalid characters will be replaced with given character, then return the rebuilt string value.
|
||
static int | detectFileFormat(java.io.InputStream stream) | |
Detects the format type of the file stored in the stream.
|
||
static int | detectFileFormat(java.lang.String fileName) | |
Detects the file format type.
|
||
static int | detectLoadFormat(java.io.InputStream stream) | |
Detects the file load format.
|
||
static int | detectLoadFormat(java.lang.String fileName) | |
Detects the file load format.
|
||
static com.aspose.cells.DateTime | getDateTimeFromDouble(double doubleValue, boolean date1904) | |
Convert the double value to the date time value.
|
||
static double | getDoubleFromDateTime(com.aspose.cells.DateTime dateTime, boolean date1904) | |
Convert the date time to double value.
|
||
static double | getTextWidth(java.lang.String text, Font font, double scaling) | |
Get width of text in unit of points.
|
||
static com.aspose.cells.Color[] | getUsedColors(Workbook workbook) | |
Gets all used colors in the workbook.
|
||
static java.lang.String | getVersion() | |
Get the release version.
|
||
static boolean | isProtectedByRMS(java.io.InputStream stream) | |
Gets whether the file is protected by Microsoft Rights Management Server.
|
||
static boolean | isProtectedByRMS(java.lang.String fileName) | |
Gets whether the file is protected by Microsoft Rights Management Server.
|
||
static void | mergeFiles(java.lang.String[] files, java.lang.String cachedFile, java.lang.String destFile) | |
Merges some large xls files to a xls file.
|
||
static java.lang.String | rowIndexToName(int row) | |
Gets row name according to row index.
|
||
static int | rowNameToIndex(java.lang.String rowName) | |
Gets row index according to row name.
|
public static int getSignificantDigits() / public static void setSignificantDigits(int value)
public static double getDPI() / public static void setDPI(double value)
public static java.lang.String getFontDir() / public static void setFontDir(java.lang.String value)
public static java.util.ArrayList getFontDirs() / public static void setFontDirs(java.util.ArrayList value)
public static java.util.ArrayList getFontFiles() / public static void setFontFiles(java.util.ArrayList value)
public static java.lang.String getStartupPath() / public static void setStartupPath(java.lang.String value)
public static java.lang.String getAltStartPath() / public static void setAltStartPath(java.lang.String value)
public static java.lang.String getLibraryPath() / public static void setLibraryPath(java.lang.String value)
public static CustomImplementationFactory getCustomImplementationFactory() / public static void setCustomImplementationFactory(CustomImplementationFactory value)
public static double getTextWidth(java.lang.String text, Font font, double scaling) throws java.lang.Exception
text
- The text.font
- The font of the text.scaling
- The scaling of text.public static java.lang.String getVersion()
public static boolean isProtectedByRMS(java.lang.String fileName) throws java.lang.Exception
fileName
- The file name.public static boolean isProtectedByRMS(java.io.InputStream stream) throws java.lang.Exception
stream
- The file stream.public static int[] cellNameToIndex(java.lang.String cellName)
public static java.lang.String cellIndexToName(int row, int column)
row
- Row index.column
- Column index.public static java.lang.String columnIndexToName(int column)
column
- Column index.public static int columnNameToIndex(java.lang.String columnName)
columnName
- Column name.public static java.lang.String rowIndexToName(int row)
row
- Row index.public static int rowNameToIndex(java.lang.String rowName)
rowName
- Row name.public static java.lang.String convertR1C1FormulaToA1(java.lang.String r1c1Formula, int row, int column)
r1c1Formula
- The r1c1 formula.row
- The row index of the cell.column
- The column index of the cell.public static java.lang.String convertA1FormulaToR1C1(java.lang.String formula, int row, int column)
formula
- The A1 formula.row
- The row index of the cell.column
- The column index of the cell.public static com.aspose.cells.DateTime getDateTimeFromDouble(double doubleValue, boolean date1904)
doubleValue
- The double value.date1904
- Date 1904 system.public static double getDoubleFromDateTime(com.aspose.cells.DateTime dateTime, boolean date1904)
dateTime
- The date time.date1904
- Date 1904 system.public static int detectLoadFormat(java.lang.String fileName) throws java.lang.Exception
fileName
- The file name.public static int detectLoadFormat(java.io.InputStream stream) throws java.lang.Exception
stream
- The stream.public static int detectFileFormat(java.lang.String fileName) throws java.lang.Exception
fileName
- the file namepublic static int detectFileFormat(java.io.InputStream stream) throws java.lang.Exception
stream
- The streampublic static com.aspose.cells.Color[] getUsedColors(Workbook workbook)
workbook
- The workbook object.public static void addAddInFunction(java.lang.String function, int minCountOfParameters, int maxCountOfParameters, int[] paramersType, int functionValueType)
function
- The function name.minCountOfParameters
- Minimum number of parameters this function requiresmaxCountOfParameters
- Maximum number of parameters this function allows.paramersType
- The excepted parameters type of the functionfunctionValueType
- A public static void mergeFiles(java.lang.String[] files, java.lang.String cachedFile, java.lang.String destFile) throws java.lang.Exception
files
- The files.cachedFile
- The cached file.destFile
- The dest file.public static java.lang.String createSafeSheetName(java.lang.String nameProposal)
nameProposal
- sheet name to be usedpublic static java.lang.String createSafeSheetName(java.lang.String nameProposal, char replaceChar)
nameProposal
- sheet name to be usedreplaceChar
- character which will be used to replace invalid characters in given sheet name