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/08/22 16:38:53 UTC
svn commit: r1757229 -
/poi/site/src/documentation/content/xdocs/spreadsheet/quick-guide.xml
Author: onealj
Date: Mon Aug 22 16:38:53 2016
New Revision: 1757229
URL: http://svn.apache.org/viewvc?rev=1757229&view=rev
Log:
update examples for bug 59791: Cell.CELL_TYPE_* -> CellType.*
Modified:
poi/site/src/documentation/content/xdocs/spreadsheet/quick-guide.xml
Modified: poi/site/src/documentation/content/xdocs/spreadsheet/quick-guide.xml
URL: http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/spreadsheet/quick-guide.xml?rev=1757229&r1=1757228&r2=1757229&view=diff
==============================================================================
--- poi/site/src/documentation/content/xdocs/spreadsheet/quick-guide.xml (original)
+++ poi/site/src/documentation/content/xdocs/spreadsheet/quick-guide.xml Mon Aug 22 16:38:53 2016
@@ -197,7 +197,7 @@
row.createCell(2).setCellValue(Calendar.getInstance());
row.createCell(3).setCellValue("a string");
row.createCell(4).setCellValue(true);
- row.createCell(5).setCellType(Cell.CELL_TYPE_ERROR);
+ row.createCell(5).setCellType(CellType.ERROR);
// Write the output to a file
FileOutputStream fileOut = new FileOutputStream("workbook.xls");
@@ -406,20 +406,20 @@
System.out.print(" - ");
switch (cell.getCellType()) {
- case Cell.CELL_TYPE_STRING:
+ case CellType.STRING:
System.out.println(cell.getRichStringCellValue().getString());
break;
- case Cell.CELL_TYPE_NUMERIC:
+ case CellType.NUMERIC:
if (DateUtil.isCellDateFormatted(cell)) {
System.out.println(cell.getDateCellValue());
} else {
System.out.println(cell.getNumericCellValue());
}
break;
- case Cell.CELL_TYPE_BOOLEAN:
+ case CellType.BOOLEAN:
System.out.println(cell.getBooleanCellValue());
break;
- case Cell.CELL_TYPE_FORMULA:
+ case CellType.FORMULA:
System.out.println(cell.getCellFormula());
break;
default:
@@ -645,7 +645,7 @@ Examples:
Cell cell = row.getCell(3);
if (cell == null)
cell = row.createCell(3);
- cell.setCellType(Cell.CELL_TYPE_STRING);
+ cell.setCellType(CellType.STRING);
cell.setCellValue("a test");
// Write the output to a file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org