Welcome Guest, Not a member yet? Register   Sign In
Need help exporting data to CSV, Excel and XML
#1

[eluser]geshan[/eluser]
Dear All,
I'm working on something and I need to export the results of a query (table mainly) to .CSV,.xls and .xml (.pdf) also ok. So please help me with it how do I do it in CI?
#2

[eluser]xwero[/eluser]
$this->dbutil->csv_from_result($db_result) and $this->dbutil->xml_from_result($db_result).

To xsl seems a little strange as it is a transforming file.
#3

[eluser]Seppo[/eluser]
xls, not xsl... That means excel...
If you want excel to open it, you can use an HTML table... but if you want a real XLS the thing gets harder... You can search for some class, like this one, for example
#4

[eluser]xwero[/eluser]
ok my mistake Smile
#5

[eluser]Ch!ps[/eluser]
Derek Allard, http://www.derekallard.com , has created a wonderful plug-in to export as Excel file.

http://codeigniter.com/wiki/Excel_Plugin/

Pretty certain he has developed one for XML as well
#6

[eluser]llbbl[/eluser]
http://ellislab.com/codeigniter/user-gui...s.html#csv




Theme © iAndrew 2016 - Forum software by © MyBB