Class ReadExcelFile
java.lang.Object
de.iip_ecosphere.platform.configuration.easyProducer.aas.ReadExcelFile
Reads an IDTA spec with pages in excel sheets and contents/tables in formatted excel cells, as e.g., created by
smallpdf.com.
- Author:
- Holger Eichelberger, SSE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static StringgetCellStringValue(org.apache.poi.ss.usermodel.Cell cell) Returns the cell string value, considering different font formatting probably indicating footnotes to be removed.private static de.iip_ecosphere.platform.support.logging.LoggerReturns the logger instance for this class.static voidExecutes the program.static AasSpecSummaryReads data from an excel file, e.g., created by smallpdf.com.static voidreadExcelData(String fileName, String outFile) Reads data from an excel file, e.g., created by smallpdf.com.static voidreadExcelData(String fileName, String outFile, String idShortPrefix) Reads data from an excel file, e.g., created by smallpdf.com.
-
Constructor Details
-
ReadExcelFile
public ReadExcelFile()
-
-
Method Details
-
read
Reads data from an excel file, e.g., created by smallpdf.com.- Parameters:
fileName- the input file name- Returns:
- an AAS spec summary
- Throws:
IOException- if the file cannot be read
-
readExcelData
Reads data from an excel file, e.g., created by smallpdf.com.- Parameters:
fileName- the input file nameoutFile- the output file, null for sysout
-
readExcelData
Reads data from an excel file, e.g., created by smallpdf.com.- Parameters:
fileName- the input file nameoutFile- the output file, null for sysoutidShortPrefix- optional prefix for idShorts, may be null (use "name" instead)
-
getCellStringValue
Returns the cell string value, considering different font formatting probably indicating footnotes to be removed. Only to be applied if the cell has a string value.- Parameters:
cell- the cell- Returns:
- the string value
-
getLogger
private static de.iip_ecosphere.platform.support.logging.Logger getLogger()Returns the logger instance for this class.- Returns:
- the logger instance
-
main
Executes the program.- Parameters:
args- command line arguments, first the file to parse, second the target file, the third the optional idShort prefix
-