0

使用 simplexls 类 v0.4 运行 PHP v5.3.10,在加载电子表格后,维度(即行数和列数)关闭。

这些行确实包含列标题,但所有数据行都是空的,即使电子表格中有数据。

以下是用于说明目的的一小部分输出样本。任何想法为什么我没有得到任何实际的细胞数据?

Array
(
    [0] => cheyco.xlsx
)
Sheets count is: 7
i = 1:

Dimensions(1) returns:
Array
(
    [0] => 4
    [1] => 5
)

Rows(1) returns:
Array
(
    [0] => Array
        (
            [0] => Facility Code
            [1] => Site ID
            [2] => Name
            [3] => Description
        )

    [1] => Array
        (
            [0] =>
        )

    [2] => Array
        (
            [2] =>
        )

)
i = 2:

Dimensions(2) returns:
Array
(
    [0] => 5
    [1] => 29
)

Rows(2) returns:
Array
(
    [0] => Array
        (
            [0] => Unit Code
            [1] => Facility Code
            [2] => Type (I,E,O)
            [3] => Name
            [4] => Description
        )

    [1] => Array
        (
            [0] =>
            [1] =>
            [3] =>
        )

    [2] => Array
        (
            [0] =>
            [1] =>
            [3] =>
        )

    [3] => Array
        (
            [0] =>
            [1] =>
            [3] =>
        )

    [4] => Array
        (
            [0] =>
            [1] =>
            [3] =>
        )

    [5] => Array
        (
            [0] =>
            [1] =>
            [3] =>
        )

    [6] => Array
        (
            [0] =>
            [1] =>
            [3] =>
        )

    [7] => Array
        (
            [0] =>
            [1] =>
            [3] =>
        )
4

1 回答 1

0

事实证明,SimpleXLS 无法读取较新的 .xlsx 格式。以以前的 .xls 格式保存文档解决了该问题。

于 2012-10-02T15:18:25.090 回答