ober Posted May 25, 2006 Share Posted May 25, 2006 I've looked through the manual and on other places on the web including searching these forums. The only thing I've found about Excel is how to open a file and push it to the user via a header call.Is there a way to create a new document... and to just save that document to a folder so I can provide a link to it where they can do a "right-click->save as..." type of deal?Any help would be appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/10432-excel-w-php/ Share on other sites More sharing options...
AndyB Posted May 25, 2006 Share Posted May 25, 2006 Not sure if this is helpful enough, but I have a working application where data are abstracted from a MySQL database and a CSV file is written (with column headings) that can be downloaded and imports into Excel.No fancy formatting, no formulae, no macros - just the plain data. Quote Link to comment https://forums.phpfreaks.com/topic/10432-excel-w-php/#findComment-38913 Share on other sites More sharing options...
.josh Posted May 25, 2006 Share Posted May 25, 2006 are you looking for something like this?[a href=\"http://www.sitepoint.com/article/pear-spreadsheet_excel_writer\" target=\"_blank\"]http://www.sitepoint.com/article/pear-spre...et_excel_writer[/a] Quote Link to comment https://forums.phpfreaks.com/topic/10432-excel-w-php/#findComment-38915 Share on other sites More sharing options...
wisewood Posted May 25, 2006 Share Posted May 25, 2006 I have a script which will extract data from mySQL database, and then by simply using a basic table layout, and then saving the HTML output into a file with a .xls extension, the resulting database data is stored as a microsoft excel document. Quote Link to comment https://forums.phpfreaks.com/topic/10432-excel-w-php/#findComment-38917 Share on other sites More sharing options...
.josh Posted May 25, 2006 Share Posted May 25, 2006 here's another linkie:[a href=\"http://www.tutorialized.com/tutorial/Create-excel-files-with-php/11042\" target=\"_blank\"]http://www.tutorialized.com/tutorial/Creat...-with-php/11042[/a] Quote Link to comment https://forums.phpfreaks.com/topic/10432-excel-w-php/#findComment-38925 Share on other sites More sharing options...
ober Posted May 25, 2006 Author Share Posted May 25, 2006 Alright... thanks for the replies all. Just to answer a few of the questions:1) I'm not looking for a CSV format. I already create that for one of my apps and that works fine.2) I'm also not looking for an export from an HTML table to Excel.I'm looking to create a new document, play with it, format it, do whatever I'd do manually with Excel, and do it all with PHP and possibly Pear.Thanks for the links CV... I'll check those out ;) Quote Link to comment https://forums.phpfreaks.com/topic/10432-excel-w-php/#findComment-38927 Share on other sites More sharing options...
nogray Posted May 25, 2006 Share Posted May 25, 2006 I did something like this long time ago, but I am not sure how flexiable it can be. Excel support .slk files. These files are text so you can write them in php no problem. Usually there is a head with the document format, then the rows with their data (like C;X4;K"test" or C;Y7;K6;ESUM(R[-3]C:R[-1]C) )The easiest way to make it is to create the form in excel and save it as .slk once you get this, you can play with it to create you file. Quote Link to comment https://forums.phpfreaks.com/topic/10432-excel-w-php/#findComment-38981 Share on other sites More sharing options...
litebearer Posted May 25, 2006 Share Posted May 25, 2006 hmmmm...Is this any help?[a href=\"http://www.sitepoint.com/article/pear-spreadsheet_excel_writer\" target=\"_blank\"]http://www.sitepoint.com/article/pear-spre...et_excel_writer[/a]Lite...[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]For example, if we wanted to save the same spreadsheet we created in our first example to a file named 'test.xls', we would do it like so:Example 2:addWorksheet('test worksheet');$worksheet->write(0, 0, 'Name');$worksheet->write(0, 1, 'Age');$worksheet->write(1, 0, 'John Smith');$worksheet->write(1, 1, 10);// We still need to explicitly close the workbook$workbook->close();?>[/quote]from [a href=\"http://blinduser.blogspot.com/2006/03/excel-and-php-without-com.html\" target=\"_blank\"]http://blinduser.blogspot.com/2006/03/exce...ithout-com.html[/a] Quote Link to comment https://forums.phpfreaks.com/topic/10432-excel-w-php/#findComment-39055 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.