Comments (7)
No, that's not true, you can write cell by cell.
$excel = new \Vtiful\Kernel\Excel($config);
$textFile = $excel->fileName("free.xlsx")
->header(['name', 'money']);
for ($index = 0; $index < 10; $index++) {
$textFile->insertText($index+1, 0, 'viest');
$textFile->insertText($index+1, 1, 10000);
}
$textFile->output();
from php-ext-xlswriter.
insertText does not support taking an array, but you can do this in one way:
$excel = new \Vtiful\Kernel\Excel($config);
$textFile = $excel->fileName("free.xlsx")
->header(['name', 'money']);
for ($index = 0; $index < 10; $index++) {
$textFile->data([
['viest', 10]
]);
}
$textFile->output();
from php-ext-xlswriter.
Whoa!
This functionality is not documented!
from php-ext-xlswriter.
Doc: https://xlswriter-docs.viest.me/en/dan-yuan-ge/cha-ru-wen-zi
from php-ext-xlswriter.
Can it be like:
$textFile->insertText( $index+1, [ 'viest', 10000 ] );
?
It would be more handy...
from php-ext-xlswriter.
Something like "insertRow" ?
from php-ext-xlswriter.
Much better - thank you !!!
from php-ext-xlswriter.
Related Issues (20)
- 该扩展要如何安装在php5.4.45上? HOT 1
- Is Array Formula supported? HOT 1
- php8.2中导出失败 HOT 4
- 有没可能一边导出一边输出文件流给客户端
- Modifying existing xlsx file HOT 1
- Collapsed rows
- Please DLL for PHP 7.4 !!! HOT 1
- Getting 2 failed tests building PHP 8.2 for Alpinelinux HOT 3
- insertText() with format and formatHandler ignores style font()?
- 支持图片嵌入excel单元中,定义样式和定位
- 8.1 8.2 版本的没编译 HOT 3
- how about add new method to set format for single cell? HOT 1
- Worksheet row or column index out of range & mergeCells HOT 1
- 1.5.2 版本 导出报错 Worksheet write exception HOT 1
- php8.1 读取文件nginx直接返回502 HOT 2
- 想问下支持分批次写入数据吗? 因为数据量比较大 只能一部分一部分的读取数据库
- xlsx转csv 身份证、手机号 变成科学记数法 HOT 1
- Validation string too long, caused buffer overflow detected
- 设置单元格格式 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.