You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

BaseTestRow.java 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  1. /* ====================================================================
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. ==================================================================== */
  15. package org.apache.poi.ss.usermodel;
  16. import static org.junit.Assert.assertEquals;
  17. import static org.junit.Assert.assertFalse;
  18. import static org.junit.Assert.assertNotNull;
  19. import static org.junit.Assert.assertNull;
  20. import static org.junit.Assert.assertSame;
  21. import static org.junit.Assert.assertTrue;
  22. import static org.junit.Assert.fail;
  23. import java.io.IOException;
  24. import java.util.Iterator;
  25. import org.apache.poi.ss.ITestDataProvider;
  26. import org.apache.poi.ss.usermodel.Row.MissingCellPolicy;
  27. import org.junit.Test;
  28. /**
  29. * A base class for testing implementations of
  30. * {@link org.apache.poi.ss.usermodel.Row}
  31. */
  32. public abstract class BaseTestRow {
  33. protected final ITestDataProvider _testDataProvider;
  34. protected BaseTestRow(ITestDataProvider testDataProvider) {
  35. _testDataProvider = testDataProvider;
  36. }
  37. @Test
  38. public void testLastAndFirstColumns() throws IOException {
  39. Workbook workbook = _testDataProvider.createWorkbook();
  40. Sheet sheet = workbook.createSheet();
  41. Row row = sheet.createRow(0);
  42. assertEquals(-1, row.getFirstCellNum());
  43. assertEquals(-1, row.getLastCellNum());
  44. //getting cells from an empty row should returns null
  45. for(int i=0; i < 10; i++) assertNull(row.getCell(i));
  46. row.createCell(2);
  47. assertEquals(2, row.getFirstCellNum());
  48. assertEquals(3, row.getLastCellNum());
  49. row.createCell(1);
  50. assertEquals(1, row.getFirstCellNum());
  51. assertEquals(3, row.getLastCellNum());
  52. // check the exact case reported in 'bug' 43901 - notice that the cellNum is '0' based
  53. row.createCell(3);
  54. assertEquals(1, row.getFirstCellNum());
  55. assertEquals(4, row.getLastCellNum());
  56. workbook.close();
  57. }
  58. /**
  59. * Make sure that there is no cross-talk between rows especially with getFirstCellNum and getLastCellNum
  60. * This test was added in response to bug report 44987.
  61. */
  62. @Test
  63. public void testBoundsInMultipleRows() throws IOException {
  64. Workbook workbook = _testDataProvider.createWorkbook();
  65. Sheet sheet = workbook.createSheet();
  66. Row rowA = sheet.createRow(0);
  67. rowA.createCell(10);
  68. rowA.createCell(5);
  69. assertEquals(5, rowA.getFirstCellNum());
  70. assertEquals(11, rowA.getLastCellNum());
  71. Row rowB = sheet.createRow(1);
  72. rowB.createCell(15);
  73. rowB.createCell(30);
  74. assertEquals(15, rowB.getFirstCellNum());
  75. assertEquals(31, rowB.getLastCellNum());
  76. assertEquals(5, rowA.getFirstCellNum());
  77. assertEquals(11, rowA.getLastCellNum());
  78. rowA.createCell(50);
  79. assertEquals(51, rowA.getLastCellNum());
  80. assertEquals(31, rowB.getLastCellNum());
  81. workbook.close();
  82. }
  83. @Test
  84. public void testRemoveCell() throws IOException {
  85. Workbook wb1 = _testDataProvider.createWorkbook();
  86. {
  87. Sheet sheet = wb1.createSheet();
  88. Row row = sheet.createRow(0);
  89. assertEquals(0, row.getPhysicalNumberOfCells());
  90. assertEquals(-1, row.getLastCellNum());
  91. assertEquals(-1, row.getFirstCellNum());
  92. row.createCell(1);
  93. assertEquals(2, row.getLastCellNum());
  94. assertEquals(1, row.getFirstCellNum());
  95. assertEquals(1, row.getPhysicalNumberOfCells());
  96. row.createCell(3);
  97. assertEquals(4, row.getLastCellNum());
  98. assertEquals(1, row.getFirstCellNum());
  99. assertEquals(2, row.getPhysicalNumberOfCells());
  100. row.removeCell(row.getCell(3));
  101. assertEquals(2, row.getLastCellNum());
  102. assertEquals(1, row.getFirstCellNum());
  103. assertEquals(1, row.getPhysicalNumberOfCells());
  104. row.removeCell(row.getCell(1));
  105. assertEquals(-1, row.getLastCellNum());
  106. assertEquals(-1, row.getFirstCellNum());
  107. assertEquals(0, row.getPhysicalNumberOfCells());
  108. }
  109. Workbook wb2 = _testDataProvider.writeOutAndReadBack(wb1);
  110. wb1.close();
  111. {
  112. Sheet sheet = wb2.getSheetAt(0);
  113. Row row = sheet.getRow(0);
  114. assertEquals(-1, row.getLastCellNum());
  115. assertEquals(-1, row.getFirstCellNum());
  116. assertEquals(0, row.getPhysicalNumberOfCells());
  117. }
  118. wb2.close();
  119. }
  120. protected void baseTestRowBounds(int maxRowNum) throws IOException {
  121. Workbook workbook = _testDataProvider.createWorkbook();
  122. Sheet sheet = workbook.createSheet();
  123. //Test low row bound
  124. sheet.createRow(0);
  125. //Test low row bound exception
  126. try {
  127. sheet.createRow(-1);
  128. fail("expected exception");
  129. } catch (IllegalArgumentException e) {
  130. // expected during successful test
  131. assertTrue("Did not find expected error message, had: " + e,
  132. e.getMessage().startsWith("Invalid row number (-1)"));
  133. }
  134. //Test high row bound
  135. sheet.createRow(maxRowNum);
  136. //Test high row bound exception
  137. try {
  138. sheet.createRow(maxRowNum + 1);
  139. fail("expected exception");
  140. } catch (IllegalArgumentException e) {
  141. // expected during successful test
  142. assertEquals("Invalid row number ("+(maxRowNum + 1)+") outside allowable range (0.."+maxRowNum+")", e.getMessage());
  143. }
  144. workbook.close();
  145. }
  146. protected void baseTestCellBounds(int maxCellNum) throws IOException {
  147. Workbook wb1 = _testDataProvider.createWorkbook();
  148. Sheet sheet = wb1.createSheet();
  149. Row row = sheet.createRow(0);
  150. //Test low cell bound
  151. try {
  152. row.createCell(-1);
  153. fail("expected exception");
  154. } catch (IllegalArgumentException e) {
  155. // expected during successful test
  156. assertTrue(e.getMessage().startsWith("Invalid column index (-1)"));
  157. }
  158. //Test high cell bound
  159. try {
  160. row.createCell(maxCellNum + 1);
  161. fail("expected exception");
  162. } catch (IllegalArgumentException e) {
  163. // expected during successful test
  164. assertTrue(e.getMessage().startsWith("Invalid column index ("+(maxCellNum+1)+")"));
  165. }
  166. for(int i=0; i < maxCellNum; i++){
  167. row.createCell(i);
  168. }
  169. assertEquals(maxCellNum, row.getPhysicalNumberOfCells());
  170. Workbook wb2 = _testDataProvider.writeOutAndReadBack(wb1);
  171. wb1.close();
  172. sheet = wb2.getSheetAt(0);
  173. row = sheet.getRow(0);
  174. assertEquals(maxCellNum, row.getPhysicalNumberOfCells());
  175. for(int i=0; i < maxCellNum; i++){
  176. Cell cell = row.getCell(i);
  177. assertEquals(i, cell.getColumnIndex());
  178. }
  179. wb2.close();
  180. }
  181. /**
  182. * Prior to patch 43901, POI was producing files with the wrong last-column
  183. * number on the row
  184. */
  185. @Test
  186. public void testLastCellNumIsCorrectAfterAddCell_bug43901() throws IOException {
  187. Workbook workbook = _testDataProvider.createWorkbook();
  188. Sheet sheet = workbook.createSheet("test");
  189. Row row = sheet.createRow(0);
  190. // New row has last col -1
  191. assertEquals(-1, row.getLastCellNum());
  192. if(row.getLastCellNum() == 0) {
  193. fail("Identified bug 43901");
  194. }
  195. // Create two cells, will return one higher
  196. // than that for the last number
  197. row.createCell(0);
  198. assertEquals(1, row.getLastCellNum());
  199. row.createCell(255);
  200. assertEquals(256, row.getLastCellNum());
  201. workbook.close();
  202. }
  203. /**
  204. * Tests for the missing/blank cell policy stuff
  205. */
  206. @Test
  207. public void testGetCellPolicy() throws IOException {
  208. Workbook workbook = _testDataProvider.createWorkbook();
  209. Sheet sheet = workbook.createSheet("test");
  210. Row row = sheet.createRow(0);
  211. // 0 -> string
  212. // 1 -> num
  213. // 2 missing
  214. // 3 missing
  215. // 4 -> blank
  216. // 5 -> num
  217. row.createCell(0).setCellValue("test");
  218. row.createCell(1).setCellValue(3.2);
  219. row.createCell(4, CellType.BLANK);
  220. row.createCell(5).setCellValue(4);
  221. // First up, no policy given, uses default
  222. assertEquals(CellType.STRING, row.getCell(0).getCellType());
  223. assertEquals(CellType.NUMERIC, row.getCell(1).getCellType());
  224. assertNull(row.getCell(2));
  225. assertNull(row.getCell(3));
  226. assertEquals(CellType.BLANK, row.getCell(4).getCellType());
  227. assertEquals(CellType.NUMERIC, row.getCell(5).getCellType());
  228. // RETURN_NULL_AND_BLANK - same as default
  229. assertEquals(CellType.STRING, row.getCell(0, MissingCellPolicy.RETURN_NULL_AND_BLANK).getCellType());
  230. assertEquals(CellType.NUMERIC, row.getCell(1, MissingCellPolicy.RETURN_NULL_AND_BLANK).getCellType());
  231. assertNull(row.getCell(2, MissingCellPolicy.RETURN_NULL_AND_BLANK));
  232. assertNull(row.getCell(3, MissingCellPolicy.RETURN_NULL_AND_BLANK));
  233. assertEquals(CellType.BLANK, row.getCell(4, MissingCellPolicy.RETURN_NULL_AND_BLANK).getCellType());
  234. assertEquals(CellType.NUMERIC, row.getCell(5, MissingCellPolicy.RETURN_NULL_AND_BLANK).getCellType());
  235. // RETURN_BLANK_AS_NULL - nearly the same
  236. assertEquals(CellType.STRING, row.getCell(0, MissingCellPolicy.RETURN_BLANK_AS_NULL).getCellType());
  237. assertEquals(CellType.NUMERIC, row.getCell(1, MissingCellPolicy.RETURN_BLANK_AS_NULL).getCellType());
  238. assertNull(row.getCell(2, MissingCellPolicy.RETURN_BLANK_AS_NULL));
  239. assertNull(row.getCell(3, MissingCellPolicy.RETURN_BLANK_AS_NULL));
  240. assertNull(row.getCell(4, MissingCellPolicy.RETURN_BLANK_AS_NULL));
  241. assertEquals(CellType.NUMERIC, row.getCell(5, MissingCellPolicy.RETURN_BLANK_AS_NULL).getCellType());
  242. // CREATE_NULL_AS_BLANK - creates as needed
  243. assertEquals(CellType.STRING, row.getCell(0, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellType());
  244. assertEquals(CellType.NUMERIC, row.getCell(1, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellType());
  245. assertEquals(CellType.BLANK, row.getCell(2, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellType());
  246. assertEquals(CellType.BLANK, row.getCell(3, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellType());
  247. assertEquals(CellType.BLANK, row.getCell(4, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellType());
  248. assertEquals(CellType.NUMERIC, row.getCell(5, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellType());
  249. // Check created ones get the right column
  250. assertEquals(0, row.getCell(0, MissingCellPolicy.CREATE_NULL_AS_BLANK).getColumnIndex());
  251. assertEquals(1, row.getCell(1, MissingCellPolicy.CREATE_NULL_AS_BLANK).getColumnIndex());
  252. assertEquals(2, row.getCell(2, MissingCellPolicy.CREATE_NULL_AS_BLANK).getColumnIndex());
  253. assertEquals(3, row.getCell(3, MissingCellPolicy.CREATE_NULL_AS_BLANK).getColumnIndex());
  254. assertEquals(4, row.getCell(4, MissingCellPolicy.CREATE_NULL_AS_BLANK).getColumnIndex());
  255. assertEquals(5, row.getCell(5, MissingCellPolicy.CREATE_NULL_AS_BLANK).getColumnIndex());
  256. // Now change the cell policy on the workbook, check
  257. // that that is now used if no policy given
  258. workbook.setMissingCellPolicy(MissingCellPolicy.RETURN_BLANK_AS_NULL);
  259. assertEquals(CellType.STRING, row.getCell(0).getCellType());
  260. assertEquals(CellType.NUMERIC, row.getCell(1).getCellType());
  261. assertNull(row.getCell(2));
  262. assertNull(row.getCell(3));
  263. assertNull(row.getCell(4));
  264. assertEquals(CellType.NUMERIC, row.getCell(5).getCellType());
  265. workbook.close();
  266. }
  267. @Test
  268. public void testRowHeight() throws IOException {
  269. Workbook wb1 = _testDataProvider.createWorkbook();
  270. Sheet sheet = wb1.createSheet();
  271. Row row1 = sheet.createRow(0);
  272. assertEquals(sheet.getDefaultRowHeight(), row1.getHeight());
  273. sheet.setDefaultRowHeightInPoints(20);
  274. row1.setHeight((short)-1); //reset the row height
  275. assertEquals(20.0f, row1.getHeightInPoints(), 0F);
  276. assertEquals(20*20, row1.getHeight());
  277. Row row2 = sheet.createRow(1);
  278. assertEquals(sheet.getDefaultRowHeight(), row2.getHeight());
  279. row2.setHeight((short)310);
  280. assertEquals(310, row2.getHeight());
  281. assertEquals(310F/20, row2.getHeightInPoints(), 0F);
  282. Row row3 = sheet.createRow(2);
  283. row3.setHeightInPoints(25.5f);
  284. assertEquals((short)(25.5f*20), row3.getHeight());
  285. assertEquals(25.5f, row3.getHeightInPoints(), 0F);
  286. Row row4 = sheet.createRow(3);
  287. assertFalse(row4.getZeroHeight());
  288. row4.setZeroHeight(true);
  289. assertTrue(row4.getZeroHeight());
  290. Workbook wb2 = _testDataProvider.writeOutAndReadBack(wb1);
  291. wb1.close();
  292. sheet = wb2.getSheetAt(0);
  293. row1 = sheet.getRow(0);
  294. row2 = sheet.getRow(1);
  295. row3 = sheet.getRow(2);
  296. row4 = sheet.getRow(3);
  297. assertEquals(20.0f, row1.getHeightInPoints(), 0F);
  298. assertEquals(20*20, row1.getHeight());
  299. assertEquals(310, row2.getHeight());
  300. assertEquals(310F/20, row2.getHeightInPoints(), 0F);
  301. assertEquals((short)(25.5f*20), row3.getHeight());
  302. assertEquals(25.5f, row3.getHeightInPoints(), 0F);
  303. assertFalse(row1.getZeroHeight());
  304. assertFalse(row2.getZeroHeight());
  305. assertFalse(row3.getZeroHeight());
  306. assertTrue(row4.getZeroHeight());
  307. wb2.close();
  308. }
  309. /**
  310. * Test adding cells to a row in various places and see if we can find them again.
  311. */
  312. @Test
  313. public void testCellIterator() throws IOException {
  314. Workbook wb = _testDataProvider.createWorkbook();
  315. Sheet sheet = wb.createSheet();
  316. Row row = sheet.createRow(0);
  317. // One cell at the beginning
  318. Cell cell1 = row.createCell(1);
  319. Iterator<Cell> it = row.cellIterator();
  320. assertTrue(it.hasNext());
  321. assertSame(cell1, it.next());
  322. assertFalse(it.hasNext());
  323. // Add another cell at the end
  324. Cell cell2 = row.createCell(99);
  325. it = row.cellIterator();
  326. assertTrue(it.hasNext());
  327. assertSame(cell1, it.next());
  328. assertTrue(it.hasNext());
  329. assertSame(cell2, it.next());
  330. // Add another cell at the beginning
  331. Cell cell3 = row.createCell(0);
  332. it = row.cellIterator();
  333. assertTrue(it.hasNext());
  334. assertSame(cell3, it.next());
  335. assertTrue(it.hasNext());
  336. assertSame(cell1, it.next());
  337. assertTrue(it.hasNext());
  338. assertSame(cell2, it.next());
  339. // Replace cell1
  340. Cell cell4 = row.createCell(1);
  341. it = row.cellIterator();
  342. assertTrue(it.hasNext());
  343. assertSame(cell3, it.next());
  344. assertTrue(it.hasNext());
  345. assertSame(cell4, it.next());
  346. assertTrue(it.hasNext());
  347. assertSame(cell2, it.next());
  348. assertFalse(it.hasNext());
  349. // Add another cell, specifying the cellType
  350. Cell cell5 = row.createCell(2, CellType.STRING);
  351. it = row.cellIterator();
  352. assertNotNull(cell5);
  353. assertTrue(it.hasNext());
  354. assertSame(cell3, it.next());
  355. assertTrue(it.hasNext());
  356. assertSame(cell4, it.next());
  357. assertTrue(it.hasNext());
  358. assertSame(cell5, it.next());
  359. assertTrue(it.hasNext());
  360. assertSame(cell2, it.next());
  361. assertEquals(CellType.STRING, cell5.getCellType());
  362. wb.close();
  363. }
  364. @Test
  365. public void testRowStyle() throws IOException {
  366. Workbook wb1 = _testDataProvider.createWorkbook();
  367. Sheet sheet = wb1.createSheet("test");
  368. Row row1 = sheet.createRow(0);
  369. Row row2 = sheet.createRow(1);
  370. // Won't be styled currently
  371. assertFalse(row1.isFormatted());
  372. assertFalse(row2.isFormatted());
  373. assertNull(row1.getRowStyle());
  374. assertNull(row2.getRowStyle());
  375. // Style one
  376. CellStyle style = wb1.createCellStyle();
  377. style.setDataFormat((short)4);
  378. row2.setRowStyle(style);
  379. // Check
  380. assertFalse(row1.isFormatted());
  381. assertTrue(row2.isFormatted());
  382. assertNull(row1.getRowStyle());
  383. assertEquals(style, row2.getRowStyle());
  384. // Save, load and re-check
  385. Workbook wb2 = _testDataProvider.writeOutAndReadBack(wb1);
  386. wb1.close();
  387. sheet = wb2.getSheetAt(0);
  388. row1 = sheet.getRow(0);
  389. row2 = sheet.getRow(1);
  390. style = wb2.getCellStyleAt(style.getIndex());
  391. assertFalse(row1.isFormatted());
  392. assertTrue(row2.isFormatted());
  393. assertNull(row1.getRowStyle());
  394. assertEquals(style, row2.getRowStyle());
  395. assertEquals(4, style.getDataFormat());
  396. wb2.close();
  397. }
  398. @Test
  399. public void testCellShiftingRight() {
  400. Workbook wb = _testDataProvider.createWorkbook();
  401. Sheet sheet = wb.createSheet("sheet1");
  402. Row row = sheet.createRow(0);
  403. row.createCell(0, CellType.NUMERIC).setCellValue(0);
  404. row.createCell(1, CellType.NUMERIC).setCellValue(1);
  405. row.createCell(2, CellType.NUMERIC).setCellValue(2);//C
  406. row.createCell(3, CellType.NUMERIC).setCellValue(3);//D
  407. row.createCell(4, CellType.NUMERIC).setCellValue(4);//E
  408. row.createCell(5, CellType.NUMERIC).setCellValue(5);//F
  409. row.createCell(6, CellType.NUMERIC).setCellValue(6);//G
  410. try {
  411. row.shiftCellsLeft(6, 4, 2); // range [6-4] is illegal
  412. fail("expected shiftLeft to fail");
  413. } catch (IllegalArgumentException e){
  414. row.shiftCellsRight(2, 4, 1);
  415. //should be [0.0, 1.0, null, 2.0, 3.0, 4.0, 6.0, null]
  416. Cell h1 = row.getCell(7);
  417. assertNull(h1);
  418. Cell g1 = row.getCell(6);
  419. assertEquals(6, g1.getNumericCellValue(), 0.01);
  420. Cell f1 = row.getCell(5);
  421. assertEquals(4, f1.getNumericCellValue(), 0.01);
  422. Cell e1 = row.getCell(4);
  423. assertEquals(3, e1.getNumericCellValue(), 0.01);
  424. Cell d1 = row.getCell(3);
  425. assertEquals(2, d1.getNumericCellValue(), 0.01);
  426. Cell c1 = row.getCell(2);
  427. assertNull(c1);
  428. }
  429. }
  430. @Test
  431. public void testCellShiftingLeft() {
  432. Workbook wb = _testDataProvider.createWorkbook();
  433. Sheet sheet = wb.createSheet("sheet1");
  434. Row row = sheet.createRow(0);
  435. row.createCell(0, CellType.NUMERIC).setCellValue(0);
  436. row.createCell(1, CellType.NUMERIC).setCellValue(1);
  437. row.createCell(2, CellType.NUMERIC).setCellValue(2);//C
  438. row.createCell(3, CellType.NUMERIC).setCellValue(3);//D
  439. row.createCell(4, CellType.NUMERIC).setCellValue(4);//E
  440. row.createCell(5, CellType.NUMERIC).setCellValue(5);//F
  441. row.createCell(6, CellType.NUMERIC).setCellValue(6);//G
  442. try {
  443. row.shiftCellsLeft(4, 6, -2); // step = -1 is illegal
  444. fail("expected shiftLeft to fail");
  445. } catch (IllegalArgumentException e){
  446. row.shiftCellsLeft(4, 6, 2);
  447. //should be [0.0, 1.0, 4.0, 5.0, 6.0, null, null, null]
  448. Cell b1 = row.getCell(1);
  449. assertEquals(1, b1.getNumericCellValue(), 0.01);
  450. Cell c1 = row.getCell(2);
  451. assertEquals(4, c1.getNumericCellValue(), 0.01);
  452. Cell d1 = row.getCell(3);
  453. assertEquals(5, d1.getNumericCellValue(), 0.01);
  454. Cell e1 = row.getCell(4);
  455. assertEquals(6, e1.getNumericCellValue(), 0.01);
  456. Cell f1 = row.getCell(5);
  457. assertNull(f1);
  458. }
  459. }
  460. }