You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by on...@apache.org on 2016/07/15 02:49:55 UTC
svn commit: r1752759 - in /poi/site: publish/poi-jvm-languages.html
src/documentation/content/xdocs/poi-jvm-languages.xml
Author: onealj
Date: Fri Jul 15 02:49:55 2016
New Revision: 1752759
URL: http://svn.apache.org/viewvc?rev=1752759&view=rev
Log:
fix jython example: physical number of rows is not the same as row number
Modified:
poi/site/publish/poi-jvm-languages.html
poi/site/src/documentation/content/xdocs/poi-jvm-languages.xml
Modified: poi/site/publish/poi-jvm-languages.html
URL: http://svn.apache.org/viewvc/poi/site/publish/poi-jvm-languages.html?rev=1752759&r1=1752758&r2=1752759&view=diff
==============================================================================
--- poi/site/publish/poi-jvm-languages.html (original)
+++ poi/site/publish/poi-jvm-languages.html Fri Jul 15 02:49:55 2016
@@ -305,10 +305,10 @@ if (VERSION > 3) {
# Read the contents of the workbook
wb = XSSFWorkbook('<a href="https://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/SampleSS.xlsx">SampleSS.xlsx</a>')
formatter = DataFormatter()
- for sheet in wb:
- print(sheet.sheetName)
- for r, row in enumerate(sheet, start=1):
- print('\tRow %i' % r)
+ for i, sheet in enumerate(wb, start=1):
+ print('Sheet %d of %d: %s'.format(i, wb.numberOfSheets, sheet.sheetName))
+ for row in sheet:
+ print('\tRow %i' % row.rowNum)
for cell in row:
print('\t\t%s: %s' % (cell.address, formatter.formatCellValue(cell)))
Modified: poi/site/src/documentation/content/xdocs/poi-jvm-languages.xml
URL: http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/poi-jvm-languages.xml?rev=1752759&r1=1752758&r2=1752759&view=diff
==============================================================================
--- poi/site/src/documentation/content/xdocs/poi-jvm-languages.xml (original)
+++ poi/site/src/documentation/content/xdocs/poi-jvm-languages.xml Fri Jul 15 02:49:55 2016
@@ -59,10 +59,10 @@
# Read the contents of the workbook
wb = XSSFWorkbook('<link href="https://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/SampleSS.xlsx">SampleSS.xlsx</link>')
formatter = DataFormatter()
- for sheet in wb:
- print(sheet.sheetName)
- for r, row in enumerate(sheet, start=1):
- print('\tRow %i' % r)
+ for i, sheet in enumerate(wb, start=1):
+ print('Sheet %d of %d: %s'.format(i, wb.numberOfSheets, sheet.sheetName))
+ for row in sheet:
+ print('\tRow %i' % row.rowNum)
for cell in row:
print('\t\t%s: %s' % (cell.address, formatter.formatCellValue(cell)))
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org