PhpSpreadsheet与PhpExcel活动单元格起始编号。什么是正确的值?

时间:2017-12-28 04:46:51

标签: phpexcel phpoffice phpspreadsheet

我们使用Excel但现在开始使用Spreadsheet,因为它是未来。 最近在我们的应用程序中,我必须做出改变,

这是我们的excel文件逻辑。

var $excel_start_row_index=1;
var $excel_start_column_index=0;

var $excel_start_row_index=1;
var $excel_start_column_index=1;

因为我们没有显示一列。也许我认为它发生在我们当前的作曲家更新中。所以我看到了如何设置样式的其他一些变化,applyFromArray有新的样式数组来设置背景颜色。因此,库中的这一变化是为了获得起始单元格。

我看到了

namespace PhpOffice\PhpSpreadsheet\Worksheet;
/**
 * Active cell. (Only one!).
 *
 * @var string
 */
private $activeCell = 'A1';


But where can I find the numerical representation of it? Like $activeColumn = 0 , $activeRow = 1. something like it.

“A”的数值等价物是0或1。

这里Github Issue See the second comment by Mark Baker他说它在PhpExcel中以0开头。在PhpSpreadsheet中是否相同?

1 个答案:

答案 0 :(得分:1)

经过多次讨论和辩论后,决定从1开始列索引,尝试更加一致https://gitter.im/PHPOffice/PhpSpreadsheet?at=59fa9f27976e63937e17fd27