Bug 51399 - Parser drops a column
Summary: Parser drops a column
Status: RESOLVED WORKSFORME
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-21 00:33 UTC by Martin Rademacher
Modified: 2011-06-21 02:27 UTC (History)
0 users



Attachments
simple testcase with column mismatch between header and data row (60.87 KB, application/octet-stream)
2011-06-21 00:36 UTC, Martin Rademacher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Rademacher 2011-06-21 00:33:47 UTC
I've got a xls file containing a single simple table.
Loading this file using HSSFWorkbook results in a mismatch between column headers and columns of the first data row.
Exporting the table as csv shows the same number of columns for header and data.

A dump from the loaded data follows. It looks like the COLORFAMILY data column (empty) is dropped.

Different number of columns at row 0; expected: 24, got: 23
=== XLS ROW DUMP ===
0: 'PRODUCT' -> '23302'
1: 'PRODUCT TITLE' -> 'rose fairy tutu'
2: 'COLOR/SIZE' -> ''
3: 'COLOR' -> '   '
4: 'SIZE' -> '       '
5: 'COLORFAMILY' -> 'COSTUME'
6: 'OCCASION' -> 'COSTUME'
7: 'CATEGORY' -> '49'
8: 'RETAIL' -> '0'
9: 'SALE' -> '0'
10: 'SALEPRICE' -> '0'
11: 'PERSONALIZED' -> 'Z:\Webpic\23302_p_vfall.jpg'
12: 'REGULAR_PIC' -> 'Z:\Webpic\23302_t_vfall.jpg'
13: 'THUMB_PIC' -> ''
14: 'LARGE_PIC' -> ''
15: 'ALT2_PIC' -> ''
16: 'ALT3_PIC' -> ''
17: 'ALT4_PIC' -> ''
18: 'ALT5_PIC' -> ''
19: 'ALT6_PIC' -> ''
20: 'ALT7_PIC' -> ''
21: 'ALT8_PIC' -> 'Every girl needs a fabulous tutu to inspire dreams and start fashion trends. Fabric roses and satin ties adorn the elastic waist, and for a magic touch, flower petals are sprinkled inside the tulle folds. She needs the wings and things, too. Nylon tulle. Hand wash. Made in USA.'
22: 'PROD_DESC' -> 'pamela company, tutu, girls tutu, dress up, dress up costume, wand, wings, garland, wreath, fairy, fairie, valentine, made in USA, 23112
'
23: 'KEYWORDS' -> 'null'
Comment 1 Martin Rademacher 2011-06-21 00:36:01 UTC
Created attachment 27185 [details]
simple testcase with column mismatch between header and data row
Comment 2 Nick Burch 2011-06-21 02:27:19 UTC
I see all columns as expected

Without your code I don't know what you're doing wrong, but I suspect you're assuming you'll get all cells but you haven't set an appropriate missing cell policy to request that.