java.lang.Object
de.iip_ecosphere.platform.configuration.easyProducer.aas.ReadExcelFile

public class ReadExcelFile extends Object
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 Details

    • ReadExcelFile

      public ReadExcelFile()
  • Method Details

    • read

      public static AasSpecSummary read(String fileName) throws IOException
      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

      public static void readExcelData(String fileName, String outFile)
      Reads data from an excel file, e.g., created by smallpdf.com.
      Parameters:
      fileName - the input file name
      outFile - the output file, null for sysout
    • readExcelData

      public static void readExcelData(String fileName, String outFile, String idShortPrefix)
      Reads data from an excel file, e.g., created by smallpdf.com.
      Parameters:
      fileName - the input file name
      outFile - the output file, null for sysout
      idShortPrefix - optional prefix for idShorts, may be null (use "name" instead)
    • getCellStringValue

      private static String getCellStringValue(org.apache.poi.ss.usermodel.Cell cell)
      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

      public static void main(String... args)
      Executes the program.
      Parameters:
      args - command line arguments, first the file to parse, second the target file, the third the optional idShort prefix