![]() |
Writing excel 2003 xml files - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Writing excel 2003 xml files (/showthread.php?tid=22985) |
Writing excel 2003 xml files - El Forum - 09-25-2009 [eluser]Kamarg[/eluser] I recently found myself needing to create Excel files that couldn't be accomplished with a csv file. Rather than figuring out the Excel BIFF or OOXML formats, I went and wrote a simple CodeIgniter library that can write out Excel 2003 xml files. The library also needed to be able to run on PHP4 (with the domxml extension enabled) and PHP5. Attached is a zip file containing my solution. Below is an example controller for a very simple spreadsheet that adds two cells together and formats the result as a currency then forces a download of the Excel file. As I have little time to add to the functionality, I thought I'd release it to the community to do with as they please. Code: <?php Writing excel 2003 xml files - El Forum - 11-08-2009 [eluser]Bui Duc Long[/eluser] thanks for sharing ![]() Writing excel 2003 xml files - El Forum - 11-09-2009 [eluser]Kamarg[/eluser] Updated to add worksheet protection. You can't password protect an xml file (this is a MS restriction) and being plaintext it would be rather pointless anyway. Not that it isn't easy to remove the protection anyway but there's not anything that can be done about that. Writing excel 2003 xml files - El Forum - 05-03-2010 [eluser]Unknown[/eluser] Thank u for sharing, it's very2 helping me. Writing excel 2003 xml files - El Forum - 05-07-2012 [eluser]Unknown[/eluser] I can't download this zip |