Programmatically Export SSRS report from sharepoint using ReportService2010.asmx

I do this for my work currently with VS 2012 .NET 4.5 for reporting automation for PDF reports. A. For ease of use compiling your own proxy class is easier than referencing the web service each time as you may forget the service name. From Visual Studio Command Prompt: wsdl /language:CS /n:”Microsoft.SqlServer.ReportingServices2010″ http://<Server Name>/reportserver/reportservice2010.asmx?wsdl reference: … Read more

e.preventdefault(); not working

I had a similar problem, in which e.preventDefault() would work on some cases, but not on others. It showed no errors, and using try-catch was not displaying the catch alert. Adding e.stopImmediatePropagation() did the trick, in case it helps anyone (big thanks to wcpro)

Download File From SharePoint 365

I was facing the same issue and tried the answer suggested by Vadim Gremyachev. However, it still kept giving 403 error. I added two extra headers to force form based authentication like below: client.Headers.Add(“X-FORMS_BASED_AUTH_ACCEPTED”, “f”); client.Headers.Add(“User-Agent: Other”); After this it started working. So the full code goes like below: const string username = “[email protected]”; const … Read more

ThisWorkbook.FullName returns a URL after syncing with OneDrive. I want the file path on disk

This is corrected and restyled code from beerockxs. It works on my machine, but I’m not sure how well it’ll work on other setups. If others could test, that would be great. I’ll be marking beerockxs answer at the solution. Function GetLocalFile(wb As Workbook) As String ‘ Set default return GetLocalFile = wb.FullName Const HKEY_CURRENT_USER … Read more

SharePoint Rest API how to get Access Token?

To call SharePoint specific APIs you need to get a SPO specific access token. You can “swap” an regular MS Graph refresh token for an SPO specific token by doing the following: Get a delegated auth token from graph as you normally would (https://learn.microsoft.com/en-us/graph/auth-v2-user) Use the refresh_token you got and exchange it for an SPO … Read more

The HTTP request is unauthorized with client authentication scheme ‘Ntlm’ The authentication header received from the server was ‘NTLM’

Visual Studio 2005 Create a new console application project in Visual Studio Add a “Web Reference” to the Lists.asmx web service. Your URL will probably look like: http://servername/sites/SiteCollection/SubSite/_vti_bin/Lists.asmx I named my web reference: ListsWebService Write the code in program.cs (I have an Issues list here) Here is the code. using System; using System.Collections.Generic; using System.Text; … Read more

Open an Excel file from SharePoint site

Try this code to pick a file from a SharePoint site: Dim SummaryWB As Workbook Dim vrtSelectedItem As Variant With Application.FileDialog(msoFileDialogOpen) .InitialFileName = “https://sharepoint.com/team/folder” & “\” .AllowMultiSelect = False .Show For Each vrtSelectedItem In .SelectedItems Set SummaryWB = Workbooks.Open(vrtSelectedItem) Next End With If SummaryWB Is Nothing then Exit Sub If I remember correctly, the Microsoft … Read more