Open jobinli opened 1 year ago
www-data@70d0f9c95218:~$ php --ri xlswriter
xlswriter
xlswriter support => enabled Version => 1.5.2 bundled libxlsxwriter version => 1.1.3 bundled libxlsxio version => 0.2.27
内存模式下,图片指定比例,与指定行高冲突,导致图片比例异常。
$config = ['path' => './tests']; $excel = new \Vtiful\Kernel\Excel($config); // 第三个参数 False 即为关闭 ZIP64 $fileObject = $excel->constMemory('tutorial01.xlsx', 'sheet1', false)->header(['图片']); $fileObject->insertImage(1, 0, '1.jpeg', 0.05, 0.05)->setRow('A2', 65); $fileObject->output();
输出:
$config = ['path' => './tests']; $excel = new \Vtiful\Kernel\Excel($config); $fileObject = $excel->fileName('tutorial01.xlsx', 'sheet1')->header(['图片']); $fileObject->insertImage(1, 0, '1.jpeg', 0.05, 0.05)->setRow('A2', 65); $fileObject->output();
输出
解决不了 xls c扩展问题
www-data@70d0f9c95218:~$ php --ri xlswriter
xlswriter
xlswriter support => enabled Version => 1.5.2 bundled libxlsxwriter version => 1.1.3 bundled libxlsxio version => 0.2.27
内存模式下,图片指定比例,与指定行高冲突,导致图片比例异常。
输出:![image](https://user-images.githubusercontent.com/59111601/187023676-e776d1a9-91aa-4a83-a7f4-2290f55158ea.png)
输出![image](https://user-images.githubusercontent.com/59111601/187023627-d1cd7166-30a3-4ac2-9ac2-99561bda9359.png)