public class ExcelFunctions extends Object
| Constructor and Description |
|---|
ExcelFunctions()
Constructor to use the static Excel functions
|
| Modifier and Type | Method and Description |
|---|---|
static void |
addImageToWorkbookSheet(ij.ImagePlus imagePlus,
String filePath,
Object sheetNameOrIndex,
int column,
int row)
This function adds an image open in ImageJ / Fiji as PNG to the defined worksheet in a defined Excel workbook
Note: the size of images added to Excel cannot be properly controlled via the Apache POI library.
|
static void |
appendArrayAsExcelColumn(Number[] array,
String filePath,
Object sheetNameOrIndex,
int startingRow,
String columnDataFormat) |
static void |
appendArrayAsExcelColumn(String[] array,
String filePath,
Object sheetNameOrIndex,
int startingRow,
String columnDataFormat) |
static void |
appendArrayAsExcelRow(Number[] array,
String filePath,
Object sheetNameOrIndex,
int startingColumn) |
static void |
appendArrayAsExcelRow(String[] array,
String filePath,
Object sheetNameOrIndex,
int startingColumn) |
ExcelUtils |
getExcelUtils() |
static void |
saveAllOpenTablesToWorkbook(File file,
Boolean appendData,
Boolean skipHeadingsWhenAppending) |
static void |
saveAllOpenTablesToWorkbook(String filePath,
Boolean appendData,
Boolean skipHeadingsWhenAppending) |
static void |
saveTableToWorkbookSheet(ij.measure.ResultsTable ijResultsTable,
File file,
Object sheetNameOrIndex,
Boolean appendData,
Boolean skipHeadingsWhenAppending) |
static void |
saveTableToWorkbookSheet(ij.measure.ResultsTable ijResultsTable,
String filePath,
Object sheetNameOrIndex,
Boolean appendData,
Boolean skipHeadingsWhenAppending) |
static void |
saveTableToWorkbookSheet(String ijTableName,
File file,
Object sheetNameOrIndex,
Boolean appendData,
Boolean skipHeadingsWhenAppending) |
static void |
saveTableToWorkbookSheet(String ijTableName,
String filePath,
Object sheetNameOrIndex,
Boolean appendData,
Boolean skipHeadingsWhenAppending) |
static void |
setColumnDataFormat(String filePath,
Object sheetNameOrIndex,
Integer columnNumber,
String dataFormatString)
Allowed data formats can be found under:
BuiltinFormats |
public ExcelFunctions()
public ExcelUtils getExcelUtils()
public static void saveTableToWorkbookSheet(ij.measure.ResultsTable ijResultsTable,
File file,
Object sheetNameOrIndex,
Boolean appendData,
Boolean skipHeadingsWhenAppending)
ijResultsTable - - instance of an ImageJ ResultsTablefile - - The file instance which holds the Excel workbooksheetNameOrIndex - - name of the worksheet or the 0-based index of an existing sheet (the String keywords "FIRST" or "LAST" retrieve the corresponding sheets)appendData - - set false to create a new worksheet for the current table or true to append data below existing ones on an already existing worksheetskipHeadingsWhenAppending - - set false to add table data headings or set true to skip headings when appending data to seamlessly fuse data to prior onespublic static void saveTableToWorkbookSheet(ij.measure.ResultsTable ijResultsTable,
String filePath,
Object sheetNameOrIndex,
Boolean appendData,
Boolean skipHeadingsWhenAppending)
ijResultsTable - - instance of an ImageJ ResultsTablefilePath - - the String file path including the extension ".xlsx" to the Excel workbook filesheetNameOrIndex - - name of the worksheet or the 0-based index of an existing sheet (the String keywords "FIRST" or "LAST" retrieve the corresponding sheets)appendData - - set false to create a new worksheet for the current table or true to append data below existing ones on an already existing worksheetskipHeadingsWhenAppending - - set false to add table data headings or set true to skip headings when appending data to seamlessly fuse data to prior onespublic static void saveTableToWorkbookSheet(String ijTableName, File file, Object sheetNameOrIndex, Boolean appendData, Boolean skipHeadingsWhenAppending)
ijTableName - - String name of the ImageJ results tablefile - - The file instance which holds the Excel workbooksheetNameOrIndex - - name of the worksheet or the 0-based index of an existing sheet (the String keywords "FIRST" or "LAST" retrieve the corresponding sheets)appendData - - set false to create a new worksheet for the current table or true to append data below existing ones on an already existing worksheetskipHeadingsWhenAppending - - set false to add table data headings or set true to skip headings when appending data to seamlessly fuse data to prior onespublic static void saveTableToWorkbookSheet(String ijTableName, String filePath, Object sheetNameOrIndex, Boolean appendData, Boolean skipHeadingsWhenAppending)
ijTableName - - String name of the ImageJ results tablefilePath - - the String file path including the extension ".xlsx" to the Excel workbook filesheetNameOrIndex - - name of the worksheet or the 0-based index of an existing sheet (the String keywords "FIRST" or "LAST" retrieve the corresponding sheets)appendData - - set false to create a new worksheet for the current table or true to append data below existing ones on an already existing worksheetskipHeadingsWhenAppending - - set false to add table data headings or set true to skip headings when appending data to seamlessly fuse data to prior onespublic static void saveAllOpenTablesToWorkbook(File file, Boolean appendData, Boolean skipHeadingsWhenAppending)
file - - The file instance which holds the Excel workbookappendData - - set false to create a new worksheet for the current table or true to append data below existing ones on an already existing worksheetskipHeadingsWhenAppending - - set false to add table data headings or set true to skip headings when appending data to seamlessly fuse data to prior onespublic static void saveAllOpenTablesToWorkbook(String filePath, Boolean appendData, Boolean skipHeadingsWhenAppending)
filePath - - the String file path including the extension ".xlsx" to the Excel workbook fileappendData - - set false to create a new worksheet for the current table or true to append data below existing ones on an already existing worksheetskipHeadingsWhenAppending - - set false to add table data headings or set true to skip headings when appending data to seamlessly fuse data to prior onespublic static void addImageToWorkbookSheet(ij.ImagePlus imagePlus,
String filePath,
Object sheetNameOrIndex,
int column,
int row)
imagePlus - - any ImagePlus instance open in a Window in ImageJfilePath - - the String file path including the extension ".xlsx" to the Excel workbook filesheetNameOrIndex - - name of the worksheet or the 0-based index of an existing sheet (the String keywords "FIRST" or "LAST" retrieve the corresponding sheets)column - - 0-based column of the cell which should be the location of the upper left corner of the added imagerow - - 0-based row of the cell which should be the location of the upper left corner of the added imagepublic static void appendArrayAsExcelRow(Number[] array, String filePath, Object sheetNameOrIndex, int startingColumn)
array - - Number[] array which should be added to the specified RowfilePath - - the String file path including the extension ".xlsx" to the Excel workbook filesheetNameOrIndex - - name of the worksheet or the 0-based index of an existing sheet (the String keywords "FIRST" or "LAST" retrieve the corresponding sheets)startingColumn - - 0-based starting column from which onwards the array data are added to the cells of the first empty row in the sheetpublic static void appendArrayAsExcelRow(String[] array, String filePath, Object sheetNameOrIndex, int startingColumn)
array - - String[] array which should be added to the specified RowfilePath - - the String file path including the extension ".xlsx" to the Excel workbook filesheetNameOrIndex - - name of the worksheet or the 0-based index of an existing sheet (the String keywords "FIRST" or "LAST" retrieve the corresponding sheets)startingColumn - - 0-based starting column from which onwards the array data are added to the cells of the first empty row in the sheetpublic static void appendArrayAsExcelColumn(Number[] array, String filePath, Object sheetNameOrIndex, int startingRow, String columnDataFormat)
array - - Numbers[] array which should be added to the specified RowfilePath - - the String file path including the extension ".xlsx" to the Excel workbook filesheetNameOrIndex - - name of the worksheet or the 0-based index of an existing sheet (the String keywords "FIRST" or "LAST" retrieve the corresponding sheets)startingRow - - 0-based row at which the first entry of the provided array is added to the cells of the first empty column in the sheetcolumnDataFormat - - optional data format for that column (options can be found under BuiltinFormats).
This can be an empty String "" to use the setting "General", the default in Excel.public static void appendArrayAsExcelColumn(String[] array, String filePath, Object sheetNameOrIndex, int startingRow, String columnDataFormat)
array - - String[] array which should be added to the specified RowfilePath - - the String file path including the extension ".xlsx" to the Excel workbook filesheetNameOrIndex - - name of the worksheet or the 0-based index of an existing sheet (the String keywords "FIRST" or "LAST" retrieve the corresponding sheets)startingRow - - 0-based row at which the first entry of the provided array is added to the cells of the first empty column in the sheetcolumnDataFormat - - optional data format for that column (options can be found under BuiltinFormats).
This can be an empty String "" to use the setting "General", the default in Excel.public static void setColumnDataFormat(String filePath, Object sheetNameOrIndex, Integer columnNumber, String dataFormatString)
BuiltinFormatsfilePath - - file path to an .xlsx worksheet filesheetNameOrIndex - - name of the worksheet or the 0-based index of an existing sheet (the String keywords "FIRST" or "LAST" retrieve the corresponding sheets)columnNumber - - the 0-based column number to which the format change should be applieddataFormatString - - the actual format string as found in the BuiltinFormatsCopyright © 2021 BioVoxxel. All rights reserved.