Hi,
I'm fetching an Excel workbook from our intranet site and upon attemting any edits, it gives me that "File is in use" dialog with the xxxxx.xlsm is locked for editing by [my username]
The code creates a designer.workbook object opened using a blank .xlsm file, with some vba code in it. It adds some data via smart-markers. Then the call in the web code is:
designer.Workbook.Save(Response,somefilename.xlsm,ContentDisposition.Attachment, new XlsSaveOptions(SaveFormat.Xlsm)); (using aspose.cells 7.4.3.1)
This exact code worked fine when the workbook was a ver. 2003 .xls file, and the code used the SaveFormat.Excel97to2003. There were no locking issues.
Also of note--the file contains a link to itself (not my doing--not sure why it contains this link)--when I click the "enable macros" button, there is also the "update links" option, which I normally don't see. Inspecting the link shows the exact same filename. If I save the file first to my drive, then reopen, I don't have the problem. However, from a useability standpoint, the users will typically want to open the sheet, look at it, maybe do some things with it, then discard it without saving. So it's an extra hassle to have to tell the users to save it first and I'd like to avoid that if possible.
Have I taken a wrong turn in this? I have tried forcing the Workbook object to FileFormatType.Xlsm instead of leaving the default, but no joy.
Thanks for any help on this.