Code Monkey home page Code Monkey logo

Comments (7)

viest avatar viest commented on May 17, 2024

examples:

use Vtiful\Kernel\Excel;
use Vtiful\Kernel\Format;

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

$excelObject = $excel->fileName('tutorial.xlsx');
$excelHandle = $excelObject->getHandle();

// new format object
$format = new Format($excelHandle);

// set format
$formatResource = $format->bold()
    ->italic()
    ->color(Format::COLOR_ORANGE)
    ->number('#,##0')
    ->toResource();

// insert data
$filePath = $excelObject->header(['name', 'balance'])
    ->data([
        ['viest', 1000],
        ['wjx',   100000]
    ])
    ->setColumn('B:B', 50, $formatResource)  // set format
    ->output();

image

I hope this example will help you.

from php-ext-xlswriter.

sirhvd avatar sirhvd commented on May 17, 2024

Thank you. This will help me a lot.
But can I ask you for the newest php_xlswriter.dll file?
I'm tried to follow your compile instruction from https://github.com/viest/php-ext-excel-export/blob/master/README_zh.md but it's can't compile. It's told me
"xlswriter not enabled, xlsxwriter.lib or headers not found"
Thank you.

from php-ext-xlswriter.

viest avatar viest commented on May 17, 2024

Your platform is Windows or Linux?

from php-ext-xlswriter.

sirhvd avatar sirhvd commented on May 17, 2024

I'm using Windows PHP 7.1.

from php-ext-xlswriter.

viest avatar viest commented on May 17, 2024

Please download 1.2.4 at PECL.

PECL is building, just a moment, please.

https://pecl.php.net/package/xlswriter

from php-ext-xlswriter.

sirhvd avatar sirhvd commented on May 17, 2024

Really thank for your time.
Can I ask you how to compile this on windows? So I can build myself, I don't want to waste your time for this.
Thank you.

from php-ext-xlswriter.

viest avatar viest commented on May 17, 2024

https://github.com/viest/php-ext-excel-export/wiki/0%E3%80%81Install#windows

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.