Package org.apache.poi.hssf.usermodel

Examples of org.apache.poi.hssf.usermodel.HSSFWorkbook


     * @throws IOException Excelファイルの読み出しに失敗した場合
     */
    public ExcelUtils(String filename) throws IOException {
        this.filename = filename;
        InputStream is = new FileInputStream(filename);
        workbook = new HSSFWorkbook(is);
        inputDataSheet = workbook.getSheet(Constants.INPUT_DATA_SHEET_NAME);
        if (inputDataSheet == null) {
            throw new IOException("Excelファイル: " + filename + "に入力データのシートが存在しません");
        }
        outputDataSheet = workbook.getSheet(Constants.OUTPUT_DATA_SHEET_NAME);
View Full Code Here


    public void testGetXXXOption() throws Exception {
        String filename = "src/test/data/Excel/ExcelUtils/ALLT_TYPES.xls";

        // テスト対象のEXCELシートを取得
        InputStream is = new FileInputStream(filename);
        HSSFWorkbook workbook = new HSSFWorkbook(is);
        HSSFSheet sheet = workbook.getSheet(Constants.OUTPUT_DATA_SHEET_NAME);

        // テスト対象のExcelUtilsオブジェクトを生成
        ExcelUtils excelUtils =  new ExcelUtils(filename);

View Full Code Here

    public void build(File outputDirectory) throws IOException, SQLException {
        // カラム情報の取得
        columnInfos = DatabaseSchema.collectColumns(conn, databaseName, tableName);

        // ワークブックを生成
        workbook = new HSSFWorkbook();

        // セルスタイルを作成
        configureColumnStyle();

        // 入力データのシートと出力データのシートを生成
View Full Code Here

    //Get the URL
    File excelDataFile = new File(EXCEL_DATA_FILE);

    //Call the rule engine passing in the excel data file, the rules we want to use, and name of the spreadsheet that we log rules to
    HSSFWorkbook wb = ruleRunner.callRules(excelDataFile,ruleSource, EXCEL_LOG_WORKSHEET_NAME);


    //Output the workbook as a file,
    SpreadSheetOutputter.outputToFile(wb, EXCEL_LOG_WORKSHEET_NAME);
View Full Code Here

    // Create a new Excel Logging object
    SpreadSheetLogger spreadsheetLogger = new SpreadSheetLogger();

    // Convert this into a (POI) Workbook
    HSSFWorkbook wb = new HSSFWorkbook(new POIFSFileSystem(inputFromExcel));

    // Convert the cell
    RangeHolder ranges = RangeConvertor.convertExcelToCells(wb);

    //Call the overloaded method to actually run the rules
View Full Code Here

    //Get the URL
    File excelDataFile = new File(EXCEL_DATA_FILE);

    //Call the rule engine passing in the excel data file, the rules we want to use, and name of the spreadsheet that we log rules to
    HSSFWorkbook wb = ruleRunner.callRules(excelDataFile,ruleSource, EXCEL_LOG_WORKSHEET_NAME);


    //Output the workbook as a file,
    SpreadSheetOutputter.outputToFile(wb, EXCEL_LOG_WORKSHEET_NAME);
View Full Code Here

    } else {
      log.info("found file:" + EXCEL_DATA_FILE);
    }

    // Convert this into a (POI) Workbook
    HSSFWorkbook wb = new HSSFWorkbook(new POIFSFileSystem(inputFromExcel));

    // Convert the cell
    RangeHolder ranges = RangeConvertor.convertExcelToCells(wb);
    HashMap<String, Object> globals = new HashMap<String, Object>();
View Full Code Here

    } else {
      log.info("found file:" + EXCEL_DATA_FILE);
    }

    // Convert this into a (POI) Workbook
    HSSFWorkbook wb = new HSSFWorkbook(new POIFSFileSystem(inputFromExcel));

    // Convert the cell
    RangeHolder ranges = RangeConvertor.convertExcelToCells(wb);
    HashMap<String, Object> globals = new HashMap<String, Object>();
View Full Code Here

    //Get the URL
    File excelDataFile = new File(EXCEL_DATA_FILE);

    //Call the rule engine passing in the excel data file, the rules we want to use, and name of the spreadsheet that we log rules to
    HSSFWorkbook wb = sheetRuleRunner.callRules(excelDataFile,ruleSource, EXCEL_LOG_WORKSHEET_NAME);


    //Output the workbook as a file,
    SpreadSheetOutputter.outputToFile(wb, EXCEL_LOG_WORKSHEET_NAME);
View Full Code Here

      log.info("Using Excel File"+excelFile);


      URL url = new URL(excelFile);

      HSSFWorkbook wb;
      try {
        wb = commonSpreadsheetUtils.callRules(url,ruleSource, RedConstants.EXCEL_LOG_WORKSHEET_NAME);


View Full Code Here

TOP

Related Classes of org.apache.poi.hssf.usermodel.HSSFWorkbook

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.