Giter Club home page Giter Club logo

Comments (6)

viest avatar viest commented on May 29, 2024 2

@shench 感谢你的意见及建议!

from php-ext-xlswriter.

viest avatar viest commented on May 29, 2024 1

@shench 嗨,单元格对齐方式将在后面的更新中完善!

语法糖为:

$alignStyle = \Vtiful\Kernel\Format::align(...$align);

将会内置一些对齐方式,例如:FORMAT_ALIGN_CENTERFORMAT_ALIGN_VERTICAL_CENTER等等。

如果你有更好的意见及建议,欢迎您在 issues 与我交流!

from php-ext-xlswriter.

viest avatar viest commented on May 29, 2024

from php-ext-xlswriter.

viest avatar viest commented on May 29, 2024

@shench

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.

shench avatar shench commented on May 29, 2024

@viest 感谢感谢!建议谈不上,只是之前用的 PHPEXCEL ,有些功能在你这里没有,所以提了一下。
在使用的过程中我又发现了我的 3 个需求 :
1.能否在创建文件的时候可以选择不自动创建工作簿,这样就可以在下面循环创建之。比如我要循环创建几个工作簿,有不同的名称。
2.接上条,或则提供设置工作簿名称的方法,这样我可以在循环的时候从第二个循环开始创建工作簿,然后重命名第一个工作簿。
3.能否提供一个直接供浏览器下载的办法

from php-ext-xlswriter.

viest avatar viest commented on May 29, 2024

@shench
1、创建文件时,你可以自定义默认工作表的名称,通过 fileName 第二个参数;
2、如果你想追加多个工作表,你可以使用 addSheet 创建,并且命名,但是文件句柄始终指向最新创建的工作表
3、phpexcel 也只是将php中的输出流进行了封装,下载应归纳为业务流,不应包含在扩展中;
4、单元格对齐方式已经更新,文档请参考 FormatClass,目前PECL还未更新,请拉取github仓库;

from php-ext-xlswriter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.