Forum Moderators: coopster
I'm currently using headers to save web page as excel file.
header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=$excel_title.xls");
I want to be able to save a copy to the server or email a copy?
Not sure what I need to change or add to achieve this?
Have looked around and tried searching on here? - can't see the search threads feature if there is one?
Many thanks.
but you can't actually save html as excel, they aren't the same thing. If it was some table data that you wanted to save you could try saving as a CSV file which can be opened in excel.
there is a function here
[webmasterworld.com...]
It's for a pricing system, with quotes being generated by employees and partners. The materials management team want to see the quotes that are being generated.
Thanks.
If you want to write the files to the server, as opposed to your database, then have a look at fopen [uk3.php.net], fwrite [uk3.php.net] and fread [uk3.php.net].
If you want to use the last modified date on the server to stop people from accessing quotes that are older than a certian date then look at getlastmod [uk3.php.net]. However this returns the last time the page was modified not the date that the quote was originally saved, so you would need to check if that is a good enough way of limiting access to old quotes.
I can create an excel file using the header, and on the client side the user can choose to save / open. I want to be able to save the file on the server and provide a link to it, for materials management, when they look through the quotes exported table, (I create a record each time a quote is exported with just summary cost information - I can manage this!)
I've spent so long trying to find an answer to what I thought was a simple question. How do I save an excel file to the server that's created based on headers OR if this is not possible, what other methods are there to take a snap-shot of the quote page (HTML) that was dynamically created for reference later?
Thanks for you help.