PHP Excel-设置单元格或列方向(RTL) [英] PHP Excel - Set cell or Column Direction (RTL)

查看:253
本文介绍了PHP Excel-设置单元格或列方向(RTL)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种通过PHP Excel在Excel中设置单元格方向"的方法. 我翻阅了我能找到的所有文档,仅找到设置图纸方向的选项,但是,它不会影响单元格的方向,而只会影响从LTR到RTL的页面布局.

I'm looking for a way to set the "Direction" of a cell in Excel from PHP Excel. I've gone over any documentation i could find and found only the option to set the direction for a sheet, however, it does not affect the cell direction but rather, only the layout of the page from LTR to RTL.

我需要能够设置特定的单元格或更好的列(即RTL).

I need to be able to set a specific Cell or better yet, a column, to be RTL.

请注意,我不是在讨论单元格的对齐方式,而是在讨论文本方向.

Please note that I'm not talking about the alignment of the cell, I'm talking about the text direction.

这不是在PHPExcel中设置方向表的重复

谢谢

推荐答案

只能使用以下方式在工作表级别设置

This can only be set at the Worksheet level using

// right-to-left worksheet
$objPHPExcel->getActiveSheet()
    ->setRightToLeft(true);

不适用于单个单元格,单元格范围,列或行

not for individual cells, ranges of cells, columns or rows

这篇关于PHP Excel-设置单元格或列方向(RTL)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆