html table to excel spreadsheet using javascript without php
Hi can anyone help me with the script to convert a html table to excel spreadsheet using javascript without php
MIME header has been included is ther anything to be included in the script
Javascript doesn't know what a file is. You could probably write a Javascript to convert the content (provided that you have the Excel file specification to know what to convert to what - Microsoft may sell you that for a few million dollars). Of course the Javascript will be so rediculously large as to make huge web pages look microscopic. There is of course then no way for you to save that content once you have let the Javascript finish creating it (possibly a wait of several months).
To be able to do this at all you would need to use a server side language that understands what Excel is.
I tried to save a spreadsheet from javascript using the command xls.workbooks.save. If i try to close the spreadsheet, even then it asks whether to save the changes. how to prevent this from occuring?
Of course there are a lot of assumptions rolled into that Javascript function.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan
It is actually JScript/ActiveX rather than JavaScript and so the main assumptions to start with is that the browser is Internet Explorer and the Operating System is Windows since that combination is the only one to support those languages.
There may be an assumption that Excel is installed, too.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan
First of all this script is really amazing. I like it. However I tried to use your script but it only allow to saved if you enable the "Internet Options-Security Level-Custom Level-"Initialize and script ActiveX controls not marked as safe" first. Is theres any way of doing this script avoiding these setup because most people will not enable this feature in internet explorer for secuirty purpose.
Bookmarks