[prev in list] [next in list] [prev in thread] [next in thread] 

List:       poi-user
Subject:    Re: Unhiding columns doesn't seem to work
From:       "Ethan Baldridge" <ethan () superiordocumentservices ! com>
Date:       2008-12-12 23:33:11
Message-ID: 1229124791.26747.1.camel () baldridgeec ! local
[Download RAW message or body]


er, maxCellsThisSheet is initialized to zero, then gets incremented
AFTER the for() loop if the number of cells this row is greater. This
loop also only gets used in that case. I realized after I sent it that
that might look a little odd out of context. :)

On Fri, 2008-12-12 at 18:08 -0500, Ethan Baldridge wrote:
> Hello,
> 
> I'm having some issues. I'm trying to simply take input files which are
> existing XLS or XLSX files and unhide everything.
> 
> Unhiding sheets works fine, but this block of code:
> 
> for (int col = maxCellsThisSheet; col < cellsThisRow; col++)
> {
> 	wb.getSheetAt(i).setColumnHidden(col, false);
> 	//wb.getSheetAt(i).setColumnGroupCollapsed((int)col, false);
> }
> (i is the current value in a loop from 0 to wb.getNumberOfSheets())
> 
> is having some issues. Instead of unhiding columns, it makes all columns
> hidden (and setColumnHidden(col,true) instead of false still has the
> same effect) and if I uncomment the setColumnGroupCollapsed line, Excel
> won't load the output, saying the sheet is corrupt. Could somebody tell
> me what I'm doing wrong?
> 
> Thanks,
-- 
Ethan Baldridge <ethan@superiordocumentservices.com>
Superior Document Services

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic