TTWray
asked on
Default "SaveAs" Value
I have generated a an HTML table that the displays in the browser as an Excel sheet using the following code :
Content-Type: application/vnd.ms-excel
However, when the selects File >> Save As from the browser menu, I want the default file "Save as Type" to be Microsoft Excel Workbook instead of "Web Page". How do I accomplish this?
Content-Type: application/vnd.ms-excel
However, when the selects File >> Save As from the browser menu, I want the default file "Save as Type" to be Microsoft Excel Workbook instead of "Web Page". How do I accomplish this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
not familiar with LotusScript either, but that's what is making it display as Excel - not the HTML. plain HTML can NOT do that.
make sure the filename is .xls
a simple way to do this is with mod_rewrite (if you are on apache):
RewriteEngine On
RewriteRule file.xls realfilename.html
then just reference file.xls with the script
a simple way to do this is with mod_rewrite (if you are on apache):
RewriteEngine On
RewriteRule file.xls realfilename.html
then just reference file.xls with the script
This line
Content-Type: application/vnd.ms-excel
is telling the browser to display the file as Excel type
you cannot write client side script which will alter the users browser 'file' menu.
Content-Type: application/vnd.ms-excel
is telling the browser to display the file as Excel type
you cannot write client side script which will alter the users browser 'file' menu.
ASKER
I can't specify that the current page default to xls as the type instead of HTML if the user tries to save the page. I was hoping that if I could tell the browser to display it as Excel type, I could tell it to save it as Excel type also. Thanks for your help.
Hey TTwray,
Why the C?
Why the C?
ASKER