Package jslx.excel

Class ExcelTesting


  • public class ExcelTesting
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.nio.file.Path excelDir  
    • Constructor Summary

      Constructors 
      Constructor Description
      ExcelTesting()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void createWorkBookTest​(java.lang.String wbName)
      Creates an Excel workbook in the current working directory with the provided name and writes some things to its first sheet
      static void main​(java.lang.String[] args)  
      static void readWorkBookTest​(java.lang.String wbName)
      Tests the opening of a workbook in the current working directory with the supplied name reading from its first sheet.
      static void writeResultsToWorkbookWorkSheetTest1​(java.lang.String sheetName)  
      static void writeSheetAsCSVTest()
      Tests the writing an Excel sheet to a comma separated value file.
      static void writeWorkbookAsCSVTest()
      Tests the writing an Excel workbook to a set of comma separated value files.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • excelDir

        public static java.nio.file.Path excelDir
    • Constructor Detail

      • ExcelTesting

        public ExcelTesting()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
                         throws java.io.IOException,
                                java.sql.SQLException
        Throws:
        java.io.IOException
        java.sql.SQLException
      • writeResultsToWorkbookWorkSheetTest1

        public static void writeResultsToWorkbookWorkSheetTest1​(java.lang.String sheetName)
      • createWorkBookTest

        public static void createWorkBookTest​(java.lang.String wbName)
        Creates an Excel workbook in the current working directory with the provided name and writes some things to its first sheet
        Parameters:
        wbName - the name of the workbook
      • readWorkBookTest

        public static void readWorkBookTest​(java.lang.String wbName)
        Tests the opening of a workbook in the current working directory with the supplied name reading from its first sheet.
        Parameters:
        wbName - the name to read
      • writeSheetAsCSVTest

        public static void writeSheetAsCSVTest()
                                        throws java.io.IOException
        Tests the writing an Excel sheet to a comma separated value file. Depends on having ColonialTemp.xlsx in the current working directory
        Throws:
        java.io.IOException - the checked exception
      • writeWorkbookAsCSVTest

        public static void writeWorkbookAsCSVTest()
                                           throws java.io.IOException
        Tests the writing an Excel workbook to a set of comma separated value files. Depends on having ColonialTemp.xlsx in the current working directory Writes to a directory called excelOutput in the current working directory
        Throws:
        java.io.IOException - the checked exception