Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
目前,我正在从maatwebsite/excel使用phpoffice/phpspreadsheet. 将此表标题视为属性。所以我认为新库可能不支持通过表标题名称访问行值。
maatwebsite/excel
phpoffice/phpspreadsheet
使用 PHPSpreadsheet 时是否有相同的方式来读取数据?
表标题PHPSpreadsheet是列地址(A、B、C、D 等),而不是任意行的值(因为会有人在他们的工作表数据中使用多个行标题),所以答案是否定的; 尽管您可以很容易地将从行中读取的数组转换为基于单个“标题”行中的值的关联数组,使用array_combine()
PHPSpreadsheet
array_combine()