phpspreadsheet 检索单元格值作为无格式文本

时间:2021-02-12 12:07:46

标签: phpspreadsheet phpoffice-phpspreadsheet

收集必要的行到数组中 ->toArray() 不安全地尝试从单元格中获取未格式化的文本值。做了以下事情:

$reader->setReadDataOnly(true);

->rangeToArray(
        'A1:Q11',   // The worksheet range that we want to retrieve
        '',      // Value that should be returned for empty cells
        FALSE,  // Should formulas be calculated (the equivalent of getCalculatedValue() for each cell)
        FALSE,  // Should values be formatted (the equivalent of getFormattedValue() for each cell)
        TRUE    // Should the array be indexed by cell row and cell column
    );

我得到 777,7 为 777.7,但 777,77 为 777,77

0 个答案:

没有答案