Read file by data type
  • The file is not supported for the windows system.
  • Extended version is greater than or equal to 1.2.7;

Compiling

Add --enable-reader when compiling
1
./configure --enable-reader
Copied!

example

1
$config = ['path' => './tests'];
2
$excel = new \Vtiful\Kernel\Excel($config);
3
4
$filePath = $excel->fileName('tutorial.xlsx')
5
->header(['Item', 'Cost'])
6
->output();
7
8
$excel->openFile('tutorial.xlsx')
9
->openSheet();
10
11
// When reading each row of cell data, you can specify each cell data type to read
12
Var_dump($excel->nextRow([
13
\Vtiful\Kernel\Excel::TYPE_STRING, \Vtiful\Kernel\Excel::TYPE_STRING
14
]));
Copied!
Last modified 2yr ago
Copy link