Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set direction sheet in PHPExcel

Tags:

php

phpexcel

I trying to export my database data to excel file, so I use PHPExcel classes.

my sheet should be Right to left, How can I switch sheet direction to 'RTL' in PHPExcel ?

like image 355
MajAfy Avatar asked Mar 01 '13 09:03

MajAfy


1 Answers

Quoting directly from the developer documentation, which can be found in the /Documentation folder of the distribution:

4.6.48. Right-to-left worksheet

Worksheets can be set individually whether column ‘A’ should start at left or right side. Default is left. Here is how to set columns from right-to-left.

// right-to-left worksheet
$objPHPExcel->getActiveSheet()
    ->setRightToLeft(true);
like image 121
Mark Baker Avatar answered Nov 01 '22 02:11

Mark Baker