Comments (6)
@shench 感谢你的意见及建议!
from php-ext-xlswriter.
@shench 嗨,单元格对齐方式将在后面的更新中完善!
语法糖为:
$alignStyle = \Vtiful\Kernel\Format::align(...$align);
将会内置一些对齐方式,例如:FORMAT_ALIGN_CENTER
、FORMAT_ALIGN_VERTICAL_CENTER
等等。
如果你有更好的意见及建议,欢迎您在 issues 与我交流!
from php-ext-xlswriter.
from php-ext-xlswriter.
setRow
已经支持多行,可参加Demo:
$config = ['path' => './tests'];
$excel = new \Vtiful\Kernel\Excel($config);
$fileObject = $excel->fileName('tutorial01.xlsx');
$fileHandle = $fileObject->getHandle();
$boldStyle = \Vtiful\Kernel\Format::bold($fileHandle);
$filePath = $fileObject->header(['name', 'age'])
->data([
['viest', 21],
['wjx', 21]
])
->setRow('A1', 200, $boldStyle) // 单行
->setRow('A2:A3', 200, $boldStyle) // 多行
->output();
from php-ext-xlswriter.
@viest 感谢感谢!建议谈不上,只是之前用的 PHPEXCEL ,有些功能在你这里没有,所以提了一下。
在使用的过程中我又发现了我的 3 个需求 :
1.能否在创建文件的时候可以选择不自动创建工作簿,这样就可以在下面循环创建之。比如我要循环创建几个工作簿,有不同的名称。
2.接上条,或则提供设置工作簿名称的方法,这样我可以在循环的时候从第二个循环开始创建工作簿,然后重命名第一个工作簿。
3.能否提供一个直接供浏览器下载的办法
from php-ext-xlswriter.
@shench
1、创建文件时,你可以自定义默认工作表的名称,通过 fileName
第二个参数;
2、如果你想追加多个工作表,你可以使用 addSheet
创建,并且命名,但是文件句柄始终指向最新创建的工作表
;
3、phpexcel 也只是将php中的输出流进行了封装,下载应归纳为业务流,不应包含在扩展中;
4、单元格对齐方式已经更新,文档请参考 FormatClass,目前PECL还未更新,请拉取github仓库;
from php-ext-xlswriter.
Related Issues (20)
- Validation string too long, caused buffer overflow detected
- 设置单元格格式 HOT 1
- 没有找到单元格设置内容颜色功能? HOT 1
- Undocumented cell cache and non-deterministic functions
- 写入图片不支持webp
- constMemory 在1.3.2升级到1.5.5后生成的excel无法打开 HOT 3
- 是不是不能修改现有的excel文件 HOT 1
- 使用内存模式导出,导出过程中CPU很高 HOT 2
- setColumn doesn't change column width if called with explicit null format
- 导出的文件wps能打开,excel打不开 HOT 3
- 当文件名中包含英文冒号时临时文件无法创建 HOT 5
- wps能打开,excel打不开
- 有没有只读的打开方式?
- 【bug】问题比较严重,导出时候丢失部分列 HOT 2
- insertFormula issue
- 读取文件2m以上出现 找不到文件错误
- Does it support excel file to html convertion
- Windows DLL available to download
- 如何在程序中获取PHP-Xlswriter的异常码
- 能文档备注一下,支持插入哪些格式的图片吗? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-ext-xlswriter.