Guest User

Untitled

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