【问题标题】:PHPOffice/PhpSpreadsheet get cell column index as integerPHPOffice/PhpSpreadsheet 获取单元格列索引为整数
【发布时间】:2018-09-28 15:26:09
【问题描述】:

如何将单元格列索引设为整数?我已经搜索了文档,但没有找到任何东西。

【问题讨论】:

    标签: php excel phpspreadsheet phpoffice


    【解决方案1】:

    请看Accessing cells

    $ColumnIndex = \PhpOffice\PhpSpreadsheet\Cell\Coordinate::columnIndexFromString($Column);
    

    【讨论】:

      【解决方案2】:

      如果你有一个单元格,那么你可以使用公共函数 - getColumn()、getRow()、getCoordinate()

      Github阅读源码

      【讨论】:

      • 这是第一步,我认为 OP 已经找到了。但是 getColumn 和 getCoordinate 返回字符串。 OP要求整数值:)
      猜你喜欢
      • 2019-03-23
      • 2018-08-15
      • 1970-01-01
      • 2011-10-16
      • 2019-10-01
      • 1970-01-01
      • 2018-06-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多