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

constMemory 在1.3.2升级到1.5.5后生成的excel无法打开 #491

Closed
lxiaodong opened this issue Aug 1, 2023 · 3 comments
Closed

constMemory 在1.3.2升级到1.5.5后生成的excel无法打开 #491

lxiaodong opened this issue Aug 1, 2023 · 3 comments

Comments

@lxiaodong
Copy link

如题,查看源码1.5.5版本constMemory 默认增加了zip64, 1.3.2版本使用正常,1.5.5版本导出无法打开。

@lait233
Copy link

lait233 commented Aug 9, 2023

$config = ['path' => './tests'];
$excel  = new \Vtiful\Kernel\Excel($config);

// 第三个参数 False 即为关闭 ZIP64
$fileObject = $excel->constMemory('tutorial01.xlsx', NULL, false);
$fileHandle = $fileObject->getHandle();

$format    = new \Vtiful\Kernel\Format($fileHandle);
$boldStyle = $format->bold()->toResource();

$fileObject->setRow('A1', 10, $boldStyle) // 写入数据前设置行样式
    ->header(['name', 'age'])
    ->data([['viest', 21]])
    ->output();

尝试关闭了可以吗?

@Fuor
Copy link

Fuor commented Aug 22, 2023

$config = ['path' => './tests'];
$excel  = new \Vtiful\Kernel\Excel($config);

// 第三个参数 False 即为关闭 ZIP64
$fileObject = $excel->constMemory('tutorial01.xlsx', NULL, false);
$fileHandle = $fileObject->getHandle();

$format    = new \Vtiful\Kernel\Format($fileHandle);
$boldStyle = $format->bold()->toResource();

$fileObject->setRow('A1', 10, $boldStyle) // 写入数据前设置行样式
    ->header(['name', 'age'])
    ->data([['viest', 21]])
    ->output();

尝试关闭了可以吗?

同样问题,亲测开启不行,关闭后可行

@viest
Copy link
Owner

viest commented Sep 8, 2023

应该只有 WPS 无法打开 zip64 的文件吧,Office 和 其他的办公软件都是正常的。

@viest viest closed this as completed Nov 18, 2023
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

4 participants