public class ExcelFunctions extends Object
| Constructor and Description |
|---|
ExcelFunctions() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addImageToWorkbookSheet(ij.ImagePlus imagePlus,
File workbookFile)
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 |
addImageToWorkbookSheet(ij.ImagePlus imagePlus,
File workbookFile,
int sheetIndex,
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 |
addImageToWorkbookSheet(ij.ImagePlus imagePlus,
File workbookFile,
String sheetName,
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,
File workbookFile,
int sheetIndex,
int startingRow) |
static void |
appendArrayAsExcelColumn(Number[] array,
File workbookFile,
String sheetName,
int startingRow) |
static void |
appendArrayAsExcelColumn(String[] array,
File workbookFile,
int sheetIndex,
int startingRow) |
static void |
appendArrayAsExcelColumn(String[] array,
File workbookFile,
String sheetName,
int startingRow) |
static void |
appendArrayAsExcelRow(Number[] array,
File workbookFile,
int sheetIndex,
int startingColumn) |
static void |
appendArrayAsExcelRow(Number[] array,
File workbookFile,
String sheetName,
int startingColumn) |
static void |
appendArrayAsExcelRow(String[] array,
File workbookFile,
int sheetIndex,
int startingColumn) |
static void |
appendArrayAsExcelRow(String[] array,
File workbookFile,
String sheetName,
int startingColumn) |
static void |
appendTableAsColumns(ij.measure.ResultsTable ijResultsTable,
File workbookFile,
int sheetIndex,
Boolean includeColumnHeadings)
Adds the specified ResultsTable as additional columns after the existing ones on the specified sheet
|
static void |
appendTableAsColumns(ij.measure.ResultsTable ijResultsTable,
File workbookFile,
String sheetName,
Boolean includeColumnHeadings)
Adds the specified ResultsTable as additional columns after the existing ones on the specified sheet
|
static void |
appendTableAsRows(ij.measure.ResultsTable ijResultsTable,
File workbookFile,
int sheetIndex,
Boolean includeColumnHeadings)
Adds the specified ResultsTable as additional rows below the existing ones on the specified sheet
|
static void |
appendTableAsRows(ij.measure.ResultsTable ijResultsTable,
File workbookFile,
String sheetName,
Boolean includeColumnHeadings)
Adds the specified ResultsTable as additional rows below the existing ones on the specified sheet
|
static void |
deleteWorkbookSheet(File workbookFile,
int sheetIndex) |
static void |
deleteWorkbookSheet(File workbookFile,
String sheetName) |
static String |
getAllWorkbookSheetNames(File workbookFile) |
static void |
importXlsxWorksheetAsTable(File workbookFile,
int sheetIndex,
boolean useFirstRowAsHeading) |
static void |
importXlsxWorksheetAsTable(File workbookFile,
String sheetName,
boolean useFirstRowAsHeading) |
static void |
saveAllOpenTablesAsWorkbookSheets(File workbookFile,
Boolean includeColumnHeadings) |
static void |
saveAllOpenTablesAsWorkbookSheets(String filePathToXlsxWorkbookFile,
Boolean includeColumnHeadings) |
static void |
saveTableToWorkbookSheet(ij.measure.ResultsTable ijResultsTable,
File workbookFile)
Table column headings will be automatically included in the exported sheet and sheets will receive the title of the exported table as name.
|
static void |
saveTableToWorkbookSheet(ij.measure.ResultsTable ijResultsTable,
File workbookFile,
String sheetName,
Boolean includeColumnHeadings) |
static void |
saveTableToWorkbookSheet(ij.measure.ResultsTable ijResultsTable,
String filePathToXlsxWorkbookFile,
String sheetName,
Boolean includeColumnHeadings) |
static void |
setColumnDataFormat(File workbookFile,
int sheetIndex,
int columnNumber,
String dataFormatString) |
static void |
setColumnDataFormat(File workbookFile,
String sheetName,
int columnNumber,
String dataFormatString)
Allowed data formats can be found under:
BuiltinFormats |
public static void saveTableToWorkbookSheet(ij.measure.ResultsTable ijResultsTable,
File workbookFile,
String sheetName,
Boolean includeColumnHeadings)
ijResultsTable - - instance of an ImageJ ResultsTableworkbookFile - - The file instance which holds the Excel workbooksheetName - - desired name of the worksheet (if sheet name exists already, a new sheet will be created with appended numbering)includeColumnHeadings - - set true to add table data headings or set false to skip headings when adding data to a sheetpublic static void saveTableToWorkbookSheet(ij.measure.ResultsTable ijResultsTable,
String filePathToXlsxWorkbookFile,
String sheetName,
Boolean includeColumnHeadings)
ijResultsTable - - instance of an ImageJ ResultsTablefilePathToXlsxWorkbookFile - - the String file path including the extension ".xlsx" to the Excel workbook filesheetName - - desired name of the worksheet (if sheet name exists already, a new sheet will be created with appended numbering)includeColumnHeadings - - set true to add table data headings or set false to skip headings when adding data to a sheetpublic static void saveTableToWorkbookSheet(ij.measure.ResultsTable ijResultsTable,
File workbookFile)
ijResultsTable - - instance of an ImageJ ResultsTableworkbookFile - - The file instance which holds the Excel workbookpublic static void saveAllOpenTablesAsWorkbookSheets(File workbookFile, Boolean includeColumnHeadings)
workbookFile - - The file instance which holds the Excel workbookincludeColumnHeadings - - set true to add table data headings or set false to skip headings when adding data to a sheetpublic static void saveAllOpenTablesAsWorkbookSheets(String filePathToXlsxWorkbookFile, Boolean includeColumnHeadings)
filePathToXlsxWorkbookFile - - the String file path including the extension ".xlsx" to the Excel workbook fileincludeColumnHeadings - - set true to add table data headings or set false to skip headings when adding data to a sheetpublic static void addImageToWorkbookSheet(ij.ImagePlus imagePlus,
File workbookFile)
imagePlus - - any ImagePlus instance open in a Window in ImageJworkbookFile - - The file instance which holds the Excel workbookpublic static void addImageToWorkbookSheet(ij.ImagePlus imagePlus,
File workbookFile,
String sheetName,
int column,
int row)
imagePlus - - any ImagePlus instance open in a Window in ImageJworkbookFile - - Instance of an Excel workbook filesheetName - - name of the worksheet or the 0-based index of an existing sheet.column - - 0-based column of the cell which should be the location of the upper left corner of the added image (negative values take the first empty column)row - - 0-based row of the cell which should be the location of the upper left corner of the added image (negative values take the first empty row)public static void addImageToWorkbookSheet(ij.ImagePlus imagePlus,
File workbookFile,
int sheetIndex,
int column,
int row)
imagePlus - - any ImagePlus instance open in a Window in ImageJworkbookFile - - Instance of an Excel workbook filesheetIndex - - 0-based index of an existing sheet.column - - 0-based column of the cell which should be the location of the upper left corner of the added image (negative values take the first empty column)row - - 0-based row of the cell which should be the location of the upper left corner of the added image (negative values take the first empty row)public static void appendArrayAsExcelRow(Number[] array, File workbookFile, String sheetName, int startingColumn)
array - - Number[] array which should be added to the specified RowworkbookFile - - Instance of an Excel workbook filesheetName - - name String of the worksheet (if not existing it will be created)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(Number[] array, File workbookFile, int sheetIndex, int startingColumn)
array - - Number[] array which should be added to the specified RowworkbookFile - - Instance of an Excel workbook filesheetIndex - - 0-based integer index of an existing sheetstartingColumn - - 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, File workbookFile, String sheetName, int startingColumn)
array - - String[] array which should be added to the specified RowworkbookFile - - Instance of an Excel workbook filesheetName - - name String of the worksheet (if not existing it will be created)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, File workbookFile, int sheetIndex, int startingColumn)
array - - String[] array which should be added to the specified RowworkbookFile - - Instance of an Excel workbook filesheetIndex - - 0-based integer index of an existing sheetstartingColumn - - 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, File workbookFile, String sheetName, int startingRow)
array - - Numbers[] array which should be added to the specified RowworkbookFile - - Instance of an Excel workbook filesheetName - - name String of the worksheet (if not existing it will be created)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 sheetpublic static void appendArrayAsExcelColumn(Number[] array, File workbookFile, int sheetIndex, int startingRow)
array - - Numbers[] array which should be added to the specified RowworkbookFile - - Instance of an Excel workbook filesheetIndex - - 0-based integer index of an existing sheetstartingRow - - 0-based row at which the first entry of the provided array is added to the cells of the first empty column in the sheetpublic static void appendArrayAsExcelColumn(String[] array, File workbookFile, String sheetName, int startingRow)
array - - String[] array which should be added to the specified RowworkbookFile - - Instance of an Excel workbook filesheetName - - name String of the worksheet (if not existing it will be created)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 sheetpublic static void appendArrayAsExcelColumn(String[] array, File workbookFile, int sheetIndex, int startingRow)
array - - String[] array which should be added to the specified RowworkbookFile - - Instance of an Excel workbook filesheetIndex - - 0-based integer index of an existing sheetstartingRow - - 0-based row at which the first entry of the provided array is added to the cells of the first empty column in the sheetpublic static void setColumnDataFormat(File workbookFile, String sheetName, int columnNumber, String dataFormatString)
BuiltinFormatsworkbookFile - - Instance of an Excel workbook filesheetName - - name String of the worksheetcolumnNumber - - the 0-based column number to which the format change should be applieddataFormatString - - the actual format string as found in the BuiltinFormatspublic static void setColumnDataFormat(File workbookFile, int sheetIndex, int columnNumber, String dataFormatString)
workbookFile - - Instance of an Excel workbook filesheetIndex - - 0-based index of an existing sheetcolumnNumber - - the 0-based column number to which the format change should be applieddataFormatString - - the actual format string as found in the BuiltinFormatspublic static void importXlsxWorksheetAsTable(File workbookFile, String sheetName, boolean useFirstRowAsHeading)
workbookFile - - Instance of an Excel workbook filesheetName - - name String of the worksheetuseFirstRowAsHeading - - takes first sheet row as heading of the IJ tablepublic static void importXlsxWorksheetAsTable(File workbookFile, int sheetIndex, boolean useFirstRowAsHeading)
workbookFile - - Instance of an Excel workbook filesheetIndex - - 0-based index of an existing sheetuseFirstRowAsHeading - - takes first sheet row as heading of the IJ tablepublic static String getAllWorkbookSheetNames(File workbookFile)
workbookFile - - Instance of an Excel workbook filepublic static void appendTableAsColumns(ij.measure.ResultsTable ijResultsTable,
File workbookFile,
String sheetName,
Boolean includeColumnHeadings)
ijResultsTable - - instance of an ImageJ ResultsTableworkbookFile - - The file instance which holds the Excel workbooksheetName - - desired name of the worksheet (if sheet name exists already, a new sheet will be created with appended numbering)includeColumnHeadings - - set true to add table data headings or set false to skip headings when adding data to a sheetpublic static void appendTableAsColumns(ij.measure.ResultsTable ijResultsTable,
File workbookFile,
int sheetIndex,
Boolean includeColumnHeadings)
ijResultsTable - - instance of an ImageJ ResultsTableworkbookFile - - The file instance which holds the Excel workbooksheetIndex - - Integer index of desired worksheet (if name exists already, a new sheet will be created with appended numbering)includeColumnHeadings - - set true to add table data headings or set false to skip headings when adding data to a sheetpublic static void appendTableAsRows(ij.measure.ResultsTable ijResultsTable,
File workbookFile,
String sheetName,
Boolean includeColumnHeadings)
ijResultsTable - - instance of an ImageJ ResultsTableworkbookFile - - The file instance which holds the Excel workbooksheetName - - desired name of the worksheet (if sheet name exists already, a new sheet will be created with appended numbering)includeColumnHeadings - - set true to add table data headings or set false to skip headings when adding data to a sheetpublic static void appendTableAsRows(ij.measure.ResultsTable ijResultsTable,
File workbookFile,
int sheetIndex,
Boolean includeColumnHeadings)
ijResultsTable - - instance of an ImageJ ResultsTableworkbookFile - - The file instance which holds the Excel workbooksheetIndex - - Integer index of desired worksheet (if name exists already, a new sheet will be created with appended numbering)includeColumnHeadings - - set true to add table data headings or set false to skip headings when adding data to a sheetpublic static void deleteWorkbookSheet(File workbookFile, String sheetName)
workbookFile - - The file instance which holds the Excel workbooksheetName - - desired name of an existing worksheet which should be deleted (does nothing if sheet is not existing)public static void deleteWorkbookSheet(File workbookFile, int sheetIndex)
workbookFile - - The file instance which holds the Excel workbooksheetIndex - - 0-based index of an existing sheet which should be deleted (does nothing if sheet is not existing)Copyright © 2021 BioVoxxel. All rights reserved.