![]() |
how to export html table to excel || new question -> how to export rows generated by mysql queries to excel?? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: how to export html table to excel || new question -> how to export rows generated by mysql queries to excel?? (/showthread.php?tid=12374) |
how to export html table to excel || new question -> how to export rows generated by mysql queries to excel?? - El Forum - 10-16-2008 [eluser]johnmiller[/eluser] hi all... old question i need to export data from dynamic html table to excel... does codeigniter provide any feature for that??? how should i do that??? new question now the below given is my question... how to export query result to an excel??? how to export html table to excel || new question -> how to export rows generated by mysql queries to excel?? - El Forum - 10-16-2008 [eluser]Colin Williams[/eluser] http://www.codeplex.com/PHPExcel how to export html table to excel || new question -> how to export rows generated by mysql queries to excel?? - El Forum - 10-16-2008 [eluser]outrage[/eluser] You could also try this very easy to use plugin: http://codeigniter.com/wiki/Excel_Plugin/ Good luck how to export html table to excel || new question -> how to export rows generated by mysql queries to excel?? - El Forum - 10-16-2008 [eluser]Derek Allard[/eluser] [quote author="outrage" date="1224223987"]You could also try this very easy to use plugin[/quote] Ah that takes me back :: blank stare while I have fond memories :: ![]() Just in the interest of full disclosure, the plugin I wrote doesn't truly export to Excel. It exports to csv and tricks excel into opening it by changing the file extension. That said, it's probably good for 99% of potential needs. If you need full on Excel support with formulas and links and such, check out the PEAR library. how to export html table to excel || new question -> how to export rows generated by mysql queries to excel?? - El Forum - 11-06-2008 [eluser]dcunited08[/eluser] I may be wrong but Excel_Plugin exports data from a DATABASE table, not an HTML table. To do that you would have to pull the table out of output (or using $table->generate()) and change the <td>s to commas and </tr> to endlines. Is there a package that does that? how to export html table to excel || new question -> how to export rows generated by mysql queries to excel?? - El Forum - 11-06-2008 [eluser]Derek Allard[/eluser] No, you are correct dcunited08. When the OP wrote "dynamic" table, I assumed they meant "generated by a db". There's nothing in CI that parses html tables and extracts text. how to export html table to excel || new question -> how to export rows generated by mysql queries to excel?? - El Forum - 11-07-2008 [eluser]dcunited08[/eluser] I wrote a method for MY_Table that should allow you to output the table as a csv, please give it a try and let me know if it works for you. Code: /** how to export html table to excel || new question -> how to export rows generated by mysql queries to excel?? - El Forum - 11-17-2008 [eluser]johnmiller[/eluser] Thanks a lot... but, dcunited08, your code is for creating CSV file, right? I would like to create an excel. Derek is right, dynamic means generated by db only. And actually I am exporting to excel using query. Means... suppose... I have first_name and last_name in the dynamic table. If I hit 'export to excel' button, all the details related to listed people have to export to excel (like first_name, last_name, address, city, state, zip etc...) So I am trying to export data from database to excel (using query) I tried using http://codeigniter.com/wiki/Excel_Plugin/ The below is what I did controller Code: function app_details_export() model Code: function app_export($id) and /system/plugins/to_excel_pi.php but when i run this, i get a fatal error like below... Fatal error: Call to a member function field_data() on a non-object in C:\wamp\www\mywork\system\plugins\to_excel_pi.php on line 15 how to export html table to excel || new question -> how to export rows generated by mysql queries to excel?? - El Forum - 11-17-2008 [eluser]johnmiller[/eluser] and one more thing... I told you I am getting a fatal error... I am getting it after exporting some values to excel... suppose... I am exporting 20 rows to excel... sometimes 15 random rows will export to excel without any problem... and after that, in excel, i am getting fatal error message... |