ActiveSheet DisplayRightToLeft

Topics: Developer Forum, Project Management Forum, User Forum
Jul 25, 2009 at 1:10 PM

Is there a way in creating the excel sheet using phpexcel to display it in right to left

Developer
Jul 25, 2009 at 2:00 PM

Adding this as a feature request:

http://phpexcel.codeplex.com/WorkItem/View.aspx?WorkItemId=10345

Jul 27, 2009 at 7:44 AM

thanks on advance ,but i want to know if there is a method that allow the sheet to be in right to left ,for example  $sheet->getActiveSheet()->set_right_to_left();

 

Developer
Jul 27, 2009 at 10:36 PM

Luckily, Maarten has added new methods for you:

// set right-to-left column direction
$objWorksheet->setRightToLeft(true);

// set left-to-right column direction (the default)
$objWorksheet->setRightToLeft(false);

// inspect the column direction
$objWorksheet->getRightToLeft(); // true=right-to-left, false=left-to-right

Jul 28, 2009 at 10:53 AM

To use the setRightToLeft() method,,do i have to include a specific class ??

Developer
Jul 28, 2009 at 7:35 PM

>> To use the setRightToLeft() method,,do i have to include a specific class ??

No, but you will need to download the latest source code from here:
http://phpexcel.codeplex.com/SourceControl/ListDownloadableCommits.aspx

Nov 3, 2009 at 7:25 PM

I just downloaded 1.7.1 and still cant fund this function !!

so what should I do ??

Developer
Nov 4, 2009 at 12:02 AM
m_abdelfattah wrote:

I just downloaded 1.7.1 and still cant fund this function !!

so what should I do ??

The function is supposed to be there. Try example from above:

// set right-to-left column direction
$objWorksheet->setRightToLeft(true);

(Note: I just updated the PHPExcel developer documentation in latest source code because I noticed it wasn't mentioned there.)

 

Nov 12, 2009 at 10:06 AM
koyama wrote:
m_abdelfattah wrote:

I just downloaded 1.7.1 and still cant fund this function !!

so what should I do ??

The function is supposed to be there. Try example from above:

// set right-to-left column direction
$objWorksheet->setRightToLeft(true);

(Note: I just updated the PHPExcel developer documentation in latest source code because I noticed it wasn't mentioned there.)

 

Thanks it works fine now :)