posted 20 years ago
Hi,
I have a web application which opens an excel spreadsheet upon clicking a link.
It all works fine but there are a few macros on the excel sheet and they don't seem to work.
This is the code I use to open the excel sheet:
ServletOutputStream sout = null;
try {
response.setContentType(result.getMimeType());
response.setContentLength(result.getData().length);
sout = response.getOutputStream();
sout.write(result.getData());
sout.flush();
} finally {
if (sout != null) {
sout.close();
}
where the result object has the info for mime type as "application/msexcel" and the data is loaded from the database.
The macros are there but when a button is clicked on the excel sheet
it displays an error saying "the macro sharedobject.do?criteria.object=1234'!clearcontents' cannot be found".
where sharedobject.do?criteria.object=1234 is the original URL for opening the excel sheet and clearcontents is the macro name.
Any help would be appreciated.