Created
October 9, 2013 05:13
Revisions
-
kanemu created this gist
Oct 9, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ @Grab('org.jopendocument:jOpenDocument:latest.release') import org.jopendocument.dom.spreadsheet.* def odsPath = '/Users/kanemu/Desktop/画像整理.ods' def odsFile = new File(odsPath) def odsDoc = SpreadSheet.createFromFile(odsFile) def odsSheetLastIndex = odsDoc.getSheetCount()-1 MutableCell cell = null for(int i in 0..odsSheetLastIndex){ def odsSheet = odsDoc.getSheet(i) int colLastIndex = odsSheet.getColumnCount()-1 int rowLastIndex = odsSheet.getRowCount()-1 for(int r in 0..rowLastIndex){ for(int c in 0..4){ cell = odsSheet.getCellAt(c, r); println cell.getValue() } } }