I have an xls file that has some blank columns for some rows.

When I use the program here (altered for tabs instead of new lines), I get a
problem:
http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java

I receive a new line splitting the above described rows. I would prefer that
a row be a row regardless of how many empty cells are in it.

Does anyone know of a simple solution to this problem?

I imagine that when the records are generated, I am getting some
misinformation from HSSF...

The offending code makes itself known here:

<code>
                if(record instanceof LastCellOfRowDummyRecord) {
                        // Print out any missing commas if needed
                        if(minColumns > 0) {
                                // Columns are 0 based
                                if(lastColumnNumber == -1) { lastColumnNumber = 
0; }
                                for(int i=lastColumnNumber; i<(minColumns); 
i++) {
                                        output.print('\t');
                                }
                        }
        
                        // We're onto a new row
                        lastColumnNumber = -1;
        
                        // End the row
                        output.println("");
                }
</code>

I'm pretty sure some records are being marked as LastCellOfRowDummyRecord
when they shouldn't be...
-- 
View this message in context: 
http://www.nabble.com/XLS-to-Tab-delimited-getting-extra-new-lines-tp25931161p25931161.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to