displaying a sheet left to right / right to left

227 views
Skip to first unread message

iluz...@gmail.com

unread,
Aug 3, 2014, 10:32:55 AM8/3/14
to openpyx...@googlegroups.com
hi
i was wondering if it is possible to change the sheet display via openpyxl 
havent found anything at the documantation sadly

thanks

Charlie Clark

unread,
Aug 3, 2014, 12:47:13 PM8/3/14
to openpyx...@googlegroups.com
You can hide sheets using ws.sheet_state

Charlie
--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Kronenstr. 27a
Düsseldorf
D- 40217
Tel: +49-211-600-3657
Mobile: +49-178-782-6226

iluz...@gmail.com

unread,
Aug 3, 2014, 12:57:12 PM8/3/14
to openpyx...@googlegroups.com
eh sorry, i was actually refering to display left to right or right to left, forgot to mention that

בתאריך יום ראשון, 3 באוגוסט 2014 19:47:13 UTC+3, מאת Charlie Clark:

Charlie Clark

unread,
Aug 3, 2014, 12:57:52 PM8/3/14
to openpyx...@googlegroups.com
Am .08.2014, 18:57 Uhr, schrieb <iluz...@gmail.com>:

> eh sorry, i was actually refering to display left to right or right to
> left, forgot to mention that

I don't understand what you want to do.

iluz...@gmail.com

unread,
Aug 3, 2014, 1:03:02 PM8/3/14
to openpyx...@googlegroups.com
hm, in excel under Page Layout tab, theres display sheet left to right option, i was just wondering if theres any option in openpyxl to do that
sorry for not explaning properly...

בתאריך יום ראשון, 3 באוגוסט 2014 19:57:52 UTC+3, מאת Charlie Clark:

Charlie Clark

unread,
Aug 3, 2014, 1:05:50 PM8/3/14
to openpyx...@googlegroups.com
Am .08.2014, 19:03 Uhr, schrieb <iluz...@gmail.com>:

> hm, in excel under Page Layout tab, theres display sheet left to right
> option, i was just wondering if theres any option in openpyxl to do that
> sorry for not explaning properly...

You'll have to look at the page layout code.

http://openpyxl.readthedocs.org/en/latest/styles.html#edit-print-settings

I don't know this code very well myself.

iluz...@gmail.com

unread,
Aug 4, 2014, 2:43:22 PM8/4/14
to openpyx...@googlegroups.com
sadly havent found anything...still wondering if anyone knows :<

בתאריך יום ראשון, 3 באוגוסט 2014 20:05:50 UTC+3, מאת Charlie Clark:

John McNamara

unread,
Aug 5, 2014, 6:22:38 AM8/5/14
to openpyx...@googlegroups.com, iluz...@gmail.com
On Monday, 4 August 2014 19:43:22 UTC+1, iluz...@gmail.com wrote:
sadly havent found anything...still wondering if anyone knows :<


Hi,

I don't wish to drag anyone away from the excellent OpenPyXL but XlsxWriter supports right-to-left worksheets for Arabic and Hebrew (and any other language that requires it):


I looked through the OpenPyXL source code and it doesn't look like it is supported. However, it would be relatively easy to add. You would need to add the 'rightToLeft' attribute to the 'sheetView' element in worksheet.py.

Regards,

John

iluz...@gmail.com

unread,
Aug 5, 2014, 8:31:22 AM8/5/14
to openpyx...@googlegroups.com, iluz...@gmail.com
thank you very much john, worked like a charm!

בתאריך יום שלישי, 5 באוגוסט 2014 13:22:38 UTC+3, מאת John McNamara:

weiss...@gmail.com

unread,
May 30, 2018, 2:55:57 AM5/30/18
to openpyxl-users
I've been looking for a solution like that for a while, now. But I've failed to understand how to implement it onto openpyxl.
Can someone help?

Sincerely yours,
Ariel

בתאריך יום שלישי, 5 באוגוסט 2014 בשעה 15:31:22 UTC+3, מאת iluz...@gmail.com:

Charlie Clark

unread,
May 30, 2018, 3:21:39 AM5/30/18
to openpyxl-users, weiss...@gmail.com
Am .05.2018, 08:55 Uhr, schrieb <weiss...@gmail.com>:

> I've been looking for a solution like that for a while, now. But I've
> failed to understand how to implement it onto openpyxl.
> Can someone help?

It's possible just as John said and the attribute has been present for
some years now.

weiss...@gmail.com

unread,
May 30, 2018, 7:25:53 AM5/30/18
to openpyxl-users
Took me a while to get it, so I'm attaching code for future searches:

from openpyxl.worksheet.views import SheetView
book = load_workbook(steps_filename)
for eachSheet in book.worksheets:
 eachSheet.sheet_view.rightToLeft=True

Ariel

בתאריך יום רביעי, 30 במאי 2018 בשעה 10:21:39 UTC+3, מאת Charlie Clark:
Reply all
Reply to author
Forward
0 new messages