/** * Constructor * * @param output * @param input */ public ReadWrite(String input, String output) { inputWorkbook = new File(input); outputWorkbook = new File(output); logger.setSuppressWarnings(Boolean.getBoolean("jxl.nowarnings")); logger.info("Input file: " + input); logger.info("Output file: " + output); }
/** * Constructor * * @param output * @param input */ public ReadWrite(String input, String output) { inputWorkbook = new File(input); outputWorkbook = new File(output); logger.setSuppressWarnings(Boolean.getBoolean("jxl.nowarnings")); logger.info("Input file: " + input); logger.info("Output file: " + output); }
/** * Reads in the inputFile and creates a writable copy of it called outputFile * * @exception IOException * @exception BiffException */ public void readWrite() throws IOException, BiffException, WriteException { logger.info("Reading..."); Workbook w1 = Workbook.getWorkbook(inputWorkbook); logger.info("Copying..."); WritableWorkbook w2 = Workbook.createWorkbook(outputWorkbook, w1); if (inputWorkbook.getName().equals("jxlrwtest.xls")) { modify(w2); } w2.write(); w2.close(); logger.info("Done"); }
/** * Reads in the inputFile and creates a writable copy of it called outputFile * * @exception IOException * @exception BiffException */ public void readWrite() throws IOException, BiffException, WriteException { logger.info("Reading..."); Workbook w1 = Workbook.getWorkbook(inputWorkbook); logger.info("Copying..."); WritableWorkbook w2 = Workbook.createWorkbook(outputWorkbook, w1); if (inputWorkbook.getName().equals("jxlrwtest.xls")) { modify(w2); } w2.write(); w2.close(); logger.info("Done"); }
logger.info("Find test"); logger.info("named1 contents: " + c.getContents()); if (c != null) logger.info("named2 contents: " + c.getContents()); if (c != null) logger.info("named2 contents: " + c.getContents()); logger.info("namedrange top left contents: " + c.getContents()); logger.info("namedrange bottom right contents: " + c.getContents()); logger.info("nonadjacent top left contents: " + c.getContents()); logger.info("nonadjacent bottom right contents: " + c.getContents()); logger.info("horizontalnonadjacent top left contents: " + c.getContents()); logger.info("horizontalnonadjacent bottom right contents: " + c.getContents());
logger.info("Find test"); logger.info("named1 contents: " + c.getContents()); if (c != null) logger.info("named2 contents: " + c.getContents()); if (c != null) logger.info("named2 contents: " + c.getContents()); logger.info("namedrange top left contents: " + c.getContents()); logger.info("namedrange bottom right contents: " + c.getContents()); logger.info("nonadjacent top left contents: " + c.getContents()); logger.info("nonadjacent bottom right contents: " + c.getContents()); logger.info("horizontalnonadjacent top left contents: " + c.getContents()); logger.info("horizontalnonadjacent bottom right contents: " + c.getContents());
logger.info("A sample \"info\" message"); logger.warn("A sample \"warning\" message"); logger.error("A sample \"error\" message");
logger.info("A sample \"info\" message"); logger.warn("A sample \"warning\" message"); logger.error("A sample \"error\" message");
logger.info("Modifying...");
logger.info("Modifying...");