I have an ActiveX Javascript function, that pulls data from an HTML table and then populates an Excel Workbook.
This works OK, but I need to save the workbook to a network path.
I have sucessfully saved it locally:
// Save the Excel Workbook
xlBook.SaveAs("C:\\\\TEST.XLSX");
But this does not:
// Save the Excel Workbook
xlBook.SaveAs("\\\\\\Server\\\\Projects\\\\TEST.XLSX");
When attempting this, I get this error:
SaveAs method of Workbook class failed
Which refers to the above.
I have tried different variations, but with little sucess (sometimes the path will default to the Server’s ‘My Documents’/‘User Shared’ folder, with the filename:
Why are you building this on the client? Javascript will not let you save or delete a file on the users local hard drive.
However from the server side you can build the file and then push it as a download. If you are building the information on the client, then put it in some hidden field and post it to the server. All you have to do is set up proper headers and then write the content to the client. I believe it is echo in php.
technically yes, this is an internal application, specifically for company employees. do you think i’d need to save a local copy first, then copy/upload the file to the server location? i can then delete the local copy so the user is none-the-wiser?