vba - How to bypass "Other users cannot see your changes..." window when closing Sharepoint Excel document? -


i'm trying open excel workbook in sharepoint document library, modify it, , close without checking in changes.

this code i'm running:

excel.application xlapp = new excel.application(); xlapp.displayalerts = false; xlapp.visible = true; excel.workbook bk = xlapp.workbooks.open("http://sharepointsite/" + filename,false); excel.worksheet sht = bk.sheets["some data"]; sht.range["a1"].value= datetime.now.tostring(); bk.save(); xlapp.enableevents = false; bk.close(false); xlapp.enableevents = true; xlapp.displayalerts = true; xlapp.quit(); 

when call `bk.close(false), excel shows yes/no/cancel popup window message:

other users cannot see changes until check in.  want check in now? 

since don't want check in yet, click "no", , works fine. i'd automate this. there way detect popup , click "no", or better yet, bypass window entirely?

the issue resolved setting xlapp.visible false prior closing workbook, follows:

xlapp.visible = false; xlapp.displayalerts = false; bk.close(false); 

Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -