Comments (13)
@needrunning 请问你使用的版本是?
from php-ext-xlswriter.
@needrunning 请问你使用的版本是?
扩展是按照文档安装最新的 如何查看版本?
from php-ext-xlswriter.
通过 git 拉取安装,还是通过 PECL ?
from php-ext-xlswriter.
from php-ext-xlswriter.
color
在 master 分支已经修改为 fontColor
from php-ext-xlswriter.
文档正在修改,并于今晚发布 1.2.5
from php-ext-xlswriter.
color
在 master 分支已经修改为fontColor
$format = new \Vtiful\Kernel\Format($fileHandle);
$colorStyle = $format->fontColor(\Vtiful\Kernel\Format::COLOR_ORANGE)->toResource();
这样修改后提示
Call to undefined method Vtiful\Kernel\Format::fontColor()
需要重新更新扩展吧?
from php-ext-xlswriter.
@needrunning 正在发布 1.2.5
from php-ext-xlswriter.
https://pecl.php.net/package/xlswriter
1.2.5 已发布,请使用 pecl install xlswriter
进行安装
from php-ext-xlswriter.
on my MAC PHP7
Build process completed successfully
Installing '/usr/local/Cellar/[email protected]/7.2.18/pecl/20170718/xlswriter.so'
install ok: channel://pecl.php.net/xlswriter-1.2.5
Extension xlswriter enabled in php.ini
code
public function style(array $styles)
{
$fileHandle = $this->handle->getHandle();
$alignStyle = \Vtiful\Kernel\Format::align(
$fileHandle,
\Vtiful\Kernel\Format::FORMAT_ALIGN_CENTER,
\Vtiful\Kernel\Format::FORMAT_ALIGN_VERTICAL_CENTER
);
foreach ($styles as $key => $width) {
$this->handle->setColumn($key, (int) $width, $alignStyle);
}
$format = new \Vtiful\Kernel\Format($fileHandle);
$colorStyle = $format->fontColor(\Vtiful\Kernel\Format::COLOR_ORANGE)->toResource();
}
ERROR
Non-static method Vtiful\Kernel\Format::align()
from php-ext-xlswriter.
align
is not a static method, please new a format object.
$format = new \Vtiful\Kernel\Format($fileHandle);
$alignStyle = $format
->align(Format::FORMAT_ALIGN_CENTER, Format::FORMAT_ALIGN_VERTICAL_CENTER)
->toResource();
from php-ext-xlswriter.
align
is not a static method, please new a format object.$format = new \Vtiful\Kernel\Format($fileHandle); $alignStyle = $format ->align(Format::FORMAT_ALIGN_CENTER, Format::FORMAT_ALIGN_VERTICAL_CENTER) ->toResource();
OK that is OK
but another error
code
$this->handle->header($header)->data($data);
$fileHandle = $this->handle->getHandle();
$format = new \Vtiful\Kernel\Format($fileHandle);
$colorStyle = $format->fontColor(0xFF0000)->toResource();
$boldStyle = $format->bold()->toResource();
error
Call to undefined method Vtiful\Kernel\Format::fontColor()
I found that it is incorrect about color setting
from php-ext-xlswriter.
php --ri xlswriter
# You can get this output
xlswriter
xlswriter support => enabled
Version => 1.2.5
bundled libxlsxwriter version => 0.7.9
Please attach your output.
from php-ext-xlswriter.
Related Issues (20)
- 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
- 没有找到单元格设置内容颜色功能? 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
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.