lcy Posted September 15, 2009 Share Posted September 15, 2009 Hello everyone! In my current project, i'm reqiured to export the summary report to other types of file extension, including html, pdf, xls, txt, csv, ods and sxc. The problem is that i don't know a single thing about this file exporting. Hope to get some information about file exporting here. And how should i start this task? Thanks in advance. Help is appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/174285-what-is-exporting-php-file-to-other-types-of-file-extension/ Share on other sites More sharing options...
Psycho Posted September 15, 2009 Share Posted September 15, 2009 You would simply use PHP to write to a file for most of those. See tutorial below. Based upon the file type you would prepare the data differently: e.g., a CSV file you would write as comma separated, and HTML file would have HTML tags, etc. Other file types, such as PDF, can be generated using PHPs build in PDF library or even third party tools. Then others may not have a direct PHP solution. http://www.tizag.com/phpT/filewrite.php Quote Link to comment https://forums.phpfreaks.com/topic/174285-what-is-exporting-php-file-to-other-types-of-file-extension/#findComment-918746 Share on other sites More sharing options...
Mark Baker Posted September 15, 2009 Share Posted September 15, 2009 Take a look at PHPExcel which currently handles export of spreadsheet style data to html, pdf, xls and csv... ods development is currently iin progress. Quote Link to comment https://forums.phpfreaks.com/topic/174285-what-is-exporting-php-file-to-other-types-of-file-extension/#findComment-918786 Share on other sites More sharing options...
lcy Posted September 17, 2009 Author Share Posted September 17, 2009 Thanks for info provided. But i still don't get how should i do this export thing. Is it i need to download some codes for exporting .php files to those required files options, link them to my codes and that will do ...or what? Sorry for not getting what you guys mean because i don't have any single concept of this. Quote Link to comment https://forums.phpfreaks.com/topic/174285-what-is-exporting-php-file-to-other-types-of-file-extension/#findComment-919868 Share on other sites More sharing options...
Psycho Posted September 17, 2009 Share Posted September 17, 2009 Did you read the tutorial I linked to? If you read that it should get you started. To export to any particular file type you will need to know the format of that file and write a file in that format. If you can't follow the tutorial to get the basics, I'm not sure how we can help you in a forum. If, however, you have specific questions about things int he tutorial, then by all means ask. Quote Link to comment https://forums.phpfreaks.com/topic/174285-what-is-exporting-php-file-to-other-types-of-file-extension/#findComment-919877 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.