2009-11-03

Excel export module

Important! All Kohana-related posts are now at http://kohana.lillem4n.se.

This is a excel export module to Kohana. Simpel use like this:
$excelExport = new Excel_export();
$excelExport->addRow(array('first row, first column','first row, second column'));
$excelExport->addRow(array('second row, first column','second row, second column'));
$excelExport->download('myExcelFile.xls');

Full documentation of all available methods and parameters are in the module library source.

Bug reports, comments, improvements; very welcome. :)

Hashes: #kohana excel export module #kohana module #kohana #excel export #php

9 comments:

  1. Everything is fine, but ... link to this module isn't working ...

    ReplyDelete
  2. Yeah, sorry about that. My server had a little break today... link should be working now. :)

    ReplyDelete
  3. is it just me or do numbers not work correctly. I have tried a couple different ways of sending an intiger to the array and every time it gets to the cell with the intiger the 'file' property gets cleared and nothing is written to the actual file.

    ReplyDelete
  4. Hm. Just tried, and it works for me. Got any examplecode for where it does not work?

    ReplyDelete
  5. Hi Lillem4n, thanks for this module. It's working but I have 1 question: weird characters like é, à or ö are all messed up when exported to an Excel file using your module. Any idea how I could solve this? Thanks.

    ReplyDelete
  6. the link to this module isn't working
    you can help me please

    ReplyDelete
  7. @Raf: Are you using UTF-8? Microsoft Excel uses ISO instead, and that can screw things up for you.

    @anonymous: Sorry, server was down when you tried. Try again now. Working on a better server solution. :)

    ReplyDelete
  8. can i use this modules to kohana 3.2?

    ReplyDelete
    Replies
    1. I havent updated this in a good while. The file hosting server have been down for quite some time (was my home server) and this is only supported in Kohana 2x.

      It is a useful module though, so I'll probably port it to 3.2 and host in on github.com/lillem4n in the future.

      Delete