data-connections

Auto-updating Power Query Connection via VBA

社会主义新天地 提交于 2020-01-01 05:14:12
问题 I have a Power Query set in myexcel.xlsx. I set its connections's properties as this and this. I wrote a VBA code like the following Sub UpdateData() Dim filename As String Dim wbResults As Workbook filename = "C:\myexcel.xlsx" Set wbResults = Workbooks.Open(filename) ActiveWorkbook.RefreshAll wbResults.Close savechanges:=True End Sub When I open the myexcel.xslx manually, the Power Query connection updates. But through VBA code it doesn't. I should add I tested this with an old fashioned

Change Data Connection to Read Only

怎甘沉沦 提交于 2019-12-24 00:55:51
问题 I have a "summary" Excel workbook with pivots and data connections to other "data" workbooks. When refreshing the connection and a user is in the data workbook the refresh falls over saying it is read only. (It then tries to open the data workbook.) Is there a way around this? E.g. read the data rather than needing write access? Data String properties below. Provider=Microsoft.ACE.OLEDB.12.0;User ID=Admin;Data Source=C:\Test\Test.xlsm;Mode=Share Deny Write;Extended Properties="HDR=YES;";Jet

SharePoint REST query SP.UserProfiles.PeopleManager

随声附和 提交于 2019-12-11 00:36:29
问题 Is it possible to get data using REST query like below: http://moss.moss/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)?@v='user_domain\user'&$filter=DirectReports And call by JavaScript. I would like to create script which will check if user is a manager (has DirectReports) and next display JavaScript alert. Thanks in advance! 回答1: How to retrieve Manager property via SharePoint User Profiles REST API var siteUrl = _spPageContextInfo.siteAbsoluteUrl; var accountName =