Thanks,

i'll try your suggestion. 

I would renderer my Excel in PDF using FOP. I must know the width  of a column 
and the height of a row in centimeter respect to A4-sized sheet.
I noticed that it's possible get information  width in pixels of a column or  
height of a row  in pixels, but the number of pixels varies depending on screen 
resolution and its size in inches and then render a table on a PC is different 
from another.... I need a unique reference to the measures of A4 sheet .

How do i get width ahd heigth of a cell in centimeter respect A4  using POI 
3.0.2? 


> From: [email protected]
> Subject: Re: getHeightInPoints()
> Date: Sat, 12 Mar 2011 13:28:16 -0800
> To: [email protected]
> 
> Hi Mirco,
> > in a for like this
> > 
> > 
> >  
> > 
> > for (int i = startRow; i <= endRow; i++) { 
> > 
> >                               HSSFRow r = sheet.getRow(i); 
> > 
> >                               System.out.println(r. getHeightInPoints());
> > 
> >                         }        
> > 
> >  
> > 
> > I’ve printed the heights of my rows as multiple of DefaultRowHeightInPoints 
> > (15) NOT what I view on the xls file. Why?
> > 
> > I attach a example of table. I use poi-3.0.2.
> > 
> > 
> 
> The rows in your sheet are set to the default row height. The actual height 
> is expanded because columns A and D have Text Wrap turned on and some cells 
> have text that need to wrap.
> 
> HSSFRow will return the value that the Excel file is set to, yours is set to 
> the default. It is not measuring and guessing the layout with wrapping. To do 
> so is difficult and might not be consistent across different versions of 
> Excel like between Mac and Windows or OpenOffice.
> 
> If knowing the "Auto-sized" height is important then you could follow the 
> pattern of autosizing columns in the worksheet class.
> 
> Regards,
> Dave
> 
> >  
> > 
> > Thanks a lot for the help
> > 
> > Bye Mirco
> > 
> >  
> > 
> > <example.xls>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> 
                                          

Reply via email to