Wednesday, 15 August 2012

c# - Refreshing External data connection to Sharepoint library in Excel file automatically -



c# - Refreshing External data connection to Sharepoint library in Excel file automatically -

i have requirement have refresh external info in excel file on sharepoint online @ times. getting authenticated , getting file csom not problem. problem when using com refresh external info source com not authenticcated so. there not seem function in microsoft.office.interop.excel refreshing info can take fedauth cookie. or should write fedauth coockie somewhere on disk excel can find ?

think solved it. if ever needs used interop

[dllimport("wininet.dll", charset = charset.auto, setlasterror = true)] static extern bool internetsetcookieex(string lpszurlname, string lpszcookiename, string lpszcookiedata, uint dwflags, intptr dwreserved);

to set fedauth cookie obtained code , excel seems able find it

c# excel-interop sharepoint-online

No comments:

Post a Comment