To be able to run then Excel Converter you first need to get a JAR file containing the software, including all necessary dependencies. To receive that file you have to build the project. Furthermore you have to set up a Java Runtime Environment. If you'll run the Excel Converter on the machine where you built the project you can use the Java SDK which you already used for building to also run the Excel Converter.
To run the Excel Converter just open a command window an enter
cd src/samples java -jar ..\..\target\ExcelConverter-jar-with-dependencies.jar --input-file Mappe1.xls --output-file Mappe1.txt
Usage: java -jar ..\..\target\ExcelConverter-jar-with-dependencies.jar <options> Valid <options> are: -i --input-file <?> required: file name of the XLS file to process -o --output-file <?> required: file name of the CSV file to be generated (hyphen - for stdout) -d --delimiter <?> optional: delimiter (of any length) used to separate the fields in the output file (semicolon ; is used as default) -n --sheet-number <?> optional: the number (starting at 0) of the sheet to be processed (0 is used as default)
Currently some very basic error situations are handled by the Excel Converter and returned as exit code to the shell.
private static final int EXIT_STATUS_ARGS_INVALID = 1; private final static int EXIT_STATUS_INPUT_FILE_NOT_FOUND = 2; private final static int EXIT_STATUS_OUTPUT_FILE_NOT_FOUND = 3; private static final int EXIT_STATUS_INPUT_FILE_IO_EXCEPTION = 4;
TODO
Currently Slf4J NOP Binding is used which doesn't print anything at all. To display warn and error messages put Slf4J Simple Binding or Slf4J Log4J-12 Binding (and Log4J) into class path.