You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by cl...@accenture.com on 2007/04/20 04:21:31 UTC

How to seet Font orientation

Hi,

Is it possible to set the style of cell to write the cell value
vertically  ?  If so, pls help thanks! 

regards,
Clint S. Barbosa



This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.

RE: How to seet Font orientation

Posted by Anthony Andrews <py...@yahoo.com>.
I always tell people at work to 'look at the documentation' and I have signally failed to do that here, sorry.

Just looked at the javadoc for the HSSFCellStyle class and found that there is a setRotation() method there. I am guessing that this would allow you to rotate the text within the cell.

Anthony Andrews <py...@yahoo.com> wrote: Ah, sorry, I misunderstood, you are talking about the orientation option that is available if you choose Format > Cells > Alignment whilst in Excel. I have to admit that I do not whether there is a way to accomplish this or not using HSSF. If it does not prove possible using the API and if you know the cells that will be affected in advance, there is nothing to prevent you from using an on activation macro to set the property when the user opens the worksheet using Excel.

clint.barbosa@accenture.com wrote: Yes, that could work but it would just spell out the words downward, 
Is there a way I could set a certain angle of font alignment, 
Could be 45º  or  90º (vertically). Thanks for your suggestion Anthony :)


-----Original Message-----
From: Anthony Andrews [mailto:pythonaddict@yahoo.com] 
Sent: Friday, April 20, 2007 4:13 PM
To: POI Users List
Subject: Re: How to seet Font orientation

Hello Clint,

I do not know if there is a single setting to handle this requirement but I reckon you could quite easily handle it by setting wrapping on for the cell and then creating a method that generates the cell contents by simply inserting a new line character between each letter - or group of letters depending on your requirement.

clint.barbosa@accenture.com wrote: Hi,

Is it possible to set the style of cell to write the cell value
vertically  ?  If so, pls help thanks! 

regards,
Clint S. Barbosa



This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.


       
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.


This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



       
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.

       
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.

RE: How to seet Font orientation

Posted by Anthony Andrews <py...@yahoo.com>.
Ah, sorry, I misunderstood, you are talking about the orientation option that is available if you choose Format > Cells > Alignment whilst in Excel. I have to admit that I do not whether there is a way to accomplish this or not using HSSF. If it does not prove possible using the API and if you know the cells that will be affected in advance, there is nothing to prevent you from using an on activation macro to set the property when the user opens the worksheet using Excel.

clint.barbosa@accenture.com wrote: Yes, that could work but it would just spell out the words downward, 
Is there a way I could set a certain angle of font alignment, 
Could be 45º  or  90º (vertically). Thanks for your suggestion Anthony :)


-----Original Message-----
From: Anthony Andrews [mailto:pythonaddict@yahoo.com] 
Sent: Friday, April 20, 2007 4:13 PM
To: POI Users List
Subject: Re: How to seet Font orientation

Hello Clint,

I do not know if there is a single setting to handle this requirement but I reckon you could quite easily handle it by setting wrapping on for the cell and then creating a method that generates the cell contents by simply inserting a new line character between each letter - or group of letters depending on your requirement.

clint.barbosa@accenture.com wrote: Hi,

Is it possible to set the style of cell to write the cell value
vertically  ?  If so, pls help thanks! 

regards,
Clint S. Barbosa



This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.


       
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.


This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



       
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.

RE: How to seet Font orientation

Posted by cl...@accenture.com.
Yes, that could work but it would just spell out the words downward, 
Is there a way I could set a certain angle of font alignment, 
Could be 45º  or  90º (vertically). Thanks for your suggestion Anthony :)


-----Original Message-----
From: Anthony Andrews [mailto:pythonaddict@yahoo.com] 
Sent: Friday, April 20, 2007 4:13 PM
To: POI Users List
Subject: Re: How to seet Font orientation

Hello Clint,

I do not know if there is a single setting to handle this requirement but I reckon you could quite easily handle it by setting wrapping on for the cell and then creating a method that generates the cell contents by simply inserting a new line character between each letter - or group of letters depending on your requirement.

clint.barbosa@accenture.com wrote: Hi,

Is it possible to set the style of cell to write the cell value
vertically  ?  If so, pls help thanks! 

regards,
Clint S. Barbosa



This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.


       
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.


This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


Re: How to seet Font orientation

Posted by Anthony Andrews <py...@yahoo.com>.
Hello Clint,

I do not know if there is a single setting to handle this requirement but I reckon you could quite easily handle it by setting wrapping on for the cell and then creating a method that generates the cell contents by simply inserting a new line character between each letter - or group of letters depending on your requirement.

clint.barbosa@accenture.com wrote: Hi,

Is it possible to set the style of cell to write the cell value
vertically  ?  If so, pls help thanks! 

regards,
Clint S. Barbosa



This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.


       
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.