Have you tried hiding columns rather than deleting them? There is a method
decleard in the Sheet interface - and therefore implemented by both
HSSFSheet and XSSFSheet - that allows you to determine whether a column is
hidden or not - setColumnHidden(int, boolean). I do not know if this is the
case but I would expect that hidden columns will not appear either on the
printed document or within a print preview window. Of course, you will have
to keep track of how many colums to the right of your break column are
populated with data.

With regard to youyr second question, I am not quite sure what you are
asking. Are you asking whether POI has an in-built method that you can call
to delete a page?

Yours

Mark B


dgv123 wrote:
> 
> Hi,
> 
> I am new to POI and also to this user list. Here is what i am having 
> problems with
> 
> 1) Deleting columns in Excel: I set a column break at say column H..and 
> then I want to delete all the columns to the 
> right of the page break so that they dont
> appear in the 'Print Preview' page.
> 
> 2) Delete empty pages..or keep the first page.
> .and delete pages 2 and 3.
> 
> 
> Is this possible via POI?
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/POI-%28Excel%29-usage-questions.-tp24116860p24136050.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