Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void read(File file) throws IOException, InvalidFormatException {
- Workbook workbook = WorkbookFactory.create(file);
- Sheet sheet = workbook.getSheetAt(0);
- //セルの中身を読み取る処理
- workbook.close();
- }
- $ cmp -b sample-after.xlsx sample4-before.xlsx
- sample-after.xlsx sample4-before.xlsx differ: byte 7, line 1 is 12 ^J 6 ^F
- static Workbook create(java.io.File file, java.lang.String password, boolean readOnly)
- @param readOnly If the Workbook should be opened in read-only mode to avoid writing back
- changes when the document is closed.
- Workbook workbook = WorkbookFactory.create(file, null, true);
Add Comment
Please, Sign In to add comment