Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

内存模式下插入图片指定比例异常 #449

Open
jobinli opened this issue Aug 27, 2022 · 1 comment
Open

内存模式下插入图片指定比例异常 #449

jobinli opened this issue Aug 27, 2022 · 1 comment

Comments

@jobinli
Copy link

jobinli commented Aug 27, 2022

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();

输出:
image

$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();

输出
image

@chunyao
Copy link

chunyao commented Jun 14, 2023

解决不了 xls c扩展问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants