VBE313
Well-known Member
- Joined
- Mar 22, 2019
- Messages
- 686
- Office Version
- 365
- Platform
- Windows
I know that you can get SharePoint List data using _vti_bin, but can you get Excel table data using _vti_bin/ExcelRest.aspx using VBA?
I am using ListObjects.Add for SharePoint List (example of my code below)
I am using ListObjects.Add for SharePoint List (example of my code below)
VBA Code:
Sub MrExcelTets()
Dim mySh As Worksheet
Dim spSite As String
Set mySh = Sheets("SpSheet")
Dim src(0 To 1) As Variant
spSite = "https://sharepointsite.com/sites/MrExcelTest/"
src(0) = spSite & "_vti_bin"
src(1) = "{sharepoint list id}"
mySh.ListObjects.Add xlSrcExternal, src, True, xlYes, mySh.Range("A1")
End Sub