From 85f45b89f388855e453196b04b5f6218e6e41008 Mon Sep 17 00:00:00 2001 From: Glen Stampoultzis Date: Thu, 18 Sep 2003 10:52:44 +0000 Subject: [PATCH] Small unimportant fix to example code. git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/branches/REL_2_BRANCH@353359 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/poi/hssf/usermodel/examples/ReadWriteWorkbook.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/ReadWriteWorkbook.java b/src/examples/src/org/apache/poi/hssf/usermodel/examples/ReadWriteWorkbook.java index f80afb95fd..4080a4dc3d 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/ReadWriteWorkbook.java +++ b/src/examples/src/org/apache/poi/hssf/usermodel/examples/ReadWriteWorkbook.java @@ -80,6 +80,8 @@ public class ReadWriteWorkbook HSSFWorkbook wb = new HSSFWorkbook(fs); HSSFSheet sheet = wb.getSheetAt(0); HSSFRow row = sheet.getRow(2); + if (row == null) + row = sheet.createRow(2); HSSFCell cell = row.getCell((short)3); if (cell == null) cell = row.createCell((short)3); -- 2.39.5