Tuesday, July 29, 2008

xlLocalSessionChanges not working

"xlLocalSessionChanges not working"

this is the conclusion i reached when i passed XlSaveConflictResolution.xlLocalSessionChanges to workbook.SaveAs and the maddening alert showed up again.
before that i wasted a few hours wondering why my server application seemed to hang at the step when it should be writing some data to excel/csv file.
i was watching the results remotely through rdp and only later it occured to me that while i was waiting, on the server an alert appeared requiring user input - simple Yes/No/Cancel which I wasn't able to see through my remote session....

now this - setting the value to always overwrite the file and still this alertbox?

good think i quickly came upon this page:

http://www.notes411.com/dominosource/tips.nsf/0/B4EC9AD3C6CC8398802571790046F9DB!opendocument


turns out the ExcelApplication has a property that has to be set as well so this all works...cracks....excel.DisplayAlerts = false

Thanks, Mr. SCRobinson that tip had been very helpful...

No comments :