Bug 52619 - When addding to a table, the first and second row's data appears on the first row
Summary: When addding to a table, the first and second row's data appears on the first...
Status: RESOLVED WORKSFORME
Alias: None
Product: POI
Classification: Unclassified
Component: XWPF (show other bugs)
Version: 3.6-FINAL
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-07 21:41 UTC by RMNichols
Modified: 2016-02-17 21:24 UTC (History)
0 users



Attachments
This jar contains the output (.docx) and the source that created it (2.94 KB, application/x-zip-compressed)
2012-02-07 21:41 UTC, RMNichols
Details
docx file (2.36 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2012-02-07 22:04 UTC, Richard Ngo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description RMNichols 2012-02-07 21:41:49 UTC
Created attachment 28278 [details]
This jar contains the output (.docx) and the source that created it

I am new to reporting poi bugs, so be gentle on me (please).
I am trying to create table with 5 rows, 3 columns.  I am using the example (simple table) that Gisle provided.

The data for the ffirst row (0) and the second row (1) both appear on same line. There is an empty row at the bottom.  It took the sample code (which is a 3 x 3 table with some of the cells left empty) and tried to fill in each cell, and got the same results.

I am attaching the word file, and the source file to this report.
Comment 1 Richard Ngo 2012-02-07 22:04:08 UTC
Created attachment 28279 [details]
docx file

Hi,

I tried this and there were error on your code. Note sure what you were trying to do here.

XWPFTable t2 = doc.createTable();
t2.addRow(new XPWFTableRow(0));

But removing that, it did give me the correct table.
Comment 2 Dominik Stadler 2016-02-17 21:24:33 UTC
The last comment here indicates that it did work when the client-code was changed, thus I am closing this for now, please reopen with updated code if this is still a problem for you.