2012-09-12 41 views
0

使用simplexls類v0.4運行PHP v5.3.10,加載電子表格後,維度(即行和列計數)關閉。PHP simplexls - 獲取列標題,但沒有單元格數據

行確實包含列標題,但所有數據行都是空的,即使電子表格中有數據也是如此。

以下是出於說明目的的一小部分輸出示例。任何想法,爲什麼我沒有得到任何實際的細胞數據?

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] => 
     ) 
+2

你可以請一些帖子?什麼是simplexml類0.4? – dbf

+0

@dbf您的評論是無稽之談。 –

+0

嗯它應該是,你可以請張貼一些代碼? :) – dbf

回答

0

事實證明,SimpleXLS無法讀取較新的.xlsx格式。以前面的.xls格式保存文檔可以解決問題。