You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Java Fan <ja...@gmail.com> on 2009/11/12 07:35:49 UTC

Right-to-left directed sheet in POI

Good day,

I have a newbie's question about the POI API.
How can I create a new workbook and add a new sheet with "Right-To-Left"
direction?

 Workbook wb = new HSSFWorkbook();
 Sheet sheet = wb.createSheet("new sheet");
// ???????

I would expect to see the corresponding method in the Sheet's API, something
like

sheet.setDirection(short)

but I couldn't find something suitable

I'm using the newest POI jar available from the site.

Thanks a lot in advance
Mark Bramnik

Re: Right-to-left directed sheet in POI

Posted by MSB <ma...@tiscali.co.uk>.
This should be possible, a patch was submitted by another list member in
response to bug number 47970 and recently applied by Yegor as far as I
remember. My advice would be to download the very latest build of the API
and to look for methods with the word Arabic in them - I am going to guess
there will be a setArabic and a getArabic method - as the alignment
necessary for Arabic worksheets is also right to left I understand and the
patch was submitted in response to a specific request for this support.

Yours

Mark B

PS. I do not mean version 3.5 final when I say the latest version but the
most recent 3.6 beta release. For the core API, you can get that here;

http://encore.torchbox.com/poi-cvs-build/poi-3.6-beta1-20091113.jar

and can see all of the builds here;

http://encore.torchbox.com/poi-cvs-build/


Java Fan wrote:
> 
> Good day,
> 
> I have a newbie's question about the POI API.
> How can I create a new workbook and add a new sheet with "Right-To-Left"
> direction?
> 
>  Workbook wb = new HSSFWorkbook();
>  Sheet sheet = wb.createSheet("new sheet");
> // ???????
> 
> I would expect to see the corresponding method in the Sheet's API,
> something
> like
> 
> sheet.setDirection(short)
> 
> but I couldn't find something suitable
> 
> I'm using the newest POI jar available from the site.
> 
> Thanks a lot in advance
> Mark Bramnik
> 
> 

-- 
View this message in context: http://old.nabble.com/Right-to-left-directed-sheet-in-POI-tp26331127p26332380.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Right-to-left directed sheet in POI

Posted by Yegor Kozlov <ye...@dinom.ru>.
Good catch, thanks.

I didn't realize that "setArabic" is politically insensitive. This name was used in the original patch submitted in 
Bugzilla 47970.

I renamed it to setRightToLeft() - this name should be fine. The corresponding VBA property is called DisplayRightToLeft.

Yegor


> Hi Yegor -
> 
> Calling this "setArabic" is politically insensitive. Arabic is not the 
> only right to left language. Please change the name of this newly added 
> routine to setDirection.
> 
> Regards,
> Dave
> 
> 
> On Nov 12, 2009, at 11:07 PM, Yegor Kozlov wrote:
> 
>> sheet.setArabic(boolean isArabic) was added in r833537.
>>
>> To use this feature you will need the latest development version. 
>> Daily builds from trunk are available at 
>> http://encore.torchbox.com/poi-svn-build/
>>
>> Yegor
>>
>>> Good day,
>>> I have a newbie's question about the POI API.
>>> How can I create a new workbook and add a new sheet with "Right-To-Left"
>>> direction?
>>> Workbook wb = new HSSFWorkbook();
>>> Sheet sheet = wb.createSheet("new sheet");
>>> // ???????
>>> I would expect to see the corresponding method in the Sheet's API, 
>>> something
>>> like
>>> sheet.setDirection(short)
>>> but I couldn't find something suitable
>>> I'm using the newest POI jar available from the site.
>>> Thanks a lot in advance
>>> Mark Bramnik
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
>> For additional commands, e-mail: user-help@poi.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Right-to-left directed sheet in POI

Posted by David Fisher <df...@jmlafferty.com>.
Hi Yegor -

Calling this "setArabic" is politically insensitive. Arabic is not the  
only right to left language. Please change the name of this newly  
added routine to setDirection.

Regards,
Dave


On Nov 12, 2009, at 11:07 PM, Yegor Kozlov wrote:

> sheet.setArabic(boolean isArabic) was added in r833537.
>
> To use this feature you will need the latest development version.  
> Daily builds from trunk are available at http://encore.torchbox.com/poi-svn-build/
>
> Yegor
>
>> Good day,
>> I have a newbie's question about the POI API.
>> How can I create a new workbook and add a new sheet with "Right-To- 
>> Left"
>> direction?
>> Workbook wb = new HSSFWorkbook();
>> Sheet sheet = wb.createSheet("new sheet");
>> // ???????
>> I would expect to see the corresponding method in the Sheet's API,  
>> something
>> like
>> sheet.setDirection(short)
>> but I couldn't find something suitable
>> I'm using the newest POI jar available from the site.
>> Thanks a lot in advance
>> Mark Bramnik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Right-to-left directed sheet in POI

Posted by Yegor Kozlov <ye...@dinom.ru>.
sheet.setArabic(boolean isArabic) was added in r833537.

To use this feature you will need the latest development version. Daily builds from trunk are available at 
http://encore.torchbox.com/poi-svn-build/

Yegor

> Good day,
> 
> I have a newbie's question about the POI API.
> How can I create a new workbook and add a new sheet with "Right-To-Left"
> direction?
> 
>  Workbook wb = new HSSFWorkbook();
>  Sheet sheet = wb.createSheet("new sheet");
> // ???????
> 
> I would expect to see the corresponding method in the Sheet's API, something
> like
> 
> sheet.setDirection(short)
> 
> but I couldn't find something suitable
> 
> I'm using the newest POI jar available from the site.
> 
> Thanks a lot in advance
> Mark Bramnik
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org