poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From one...@apache.org
Subject svn commit: r1757229 - /poi/site/src/documentation/content/xdocs/spreadsheet/quick-guide.xml
Date Mon, 22 Aug 2016 16:38:53 GMT
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


Mime
View raw message