abhishukla15
New Member
- Joined
- May 12, 2015
- Messages
- 31
Hi,
I am looking to extract data from a SharePoint . I've got the following code so far but its giving me an error on the underline row as "Run time error 1004 : excel cannot connect to sharepoint list'. Any help?
Dim List As ListObject
Dim Wksheet As Worksheet
Const servStr As String = "http:// abc/Lists/xyz/Allitemsg.aspx"
Const listNm As String = "{XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}"
Const viewNm As String = "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}"
Set Wksheet = Worksheets.Add
Set List = Wksheet.ListObjects.Add(xlSrcExternal, Array(servStr, listNm, viewNm), , Range("A1"))
I am looking to extract data from a SharePoint . I've got the following code so far but its giving me an error on the underline row as "Run time error 1004 : excel cannot connect to sharepoint list'. Any help?
Dim List As ListObject
Dim Wksheet As Worksheet
Const servStr As String = "http:// abc/Lists/xyz/Allitemsg.aspx"
Const listNm As String = "{XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}"
Const viewNm As String = "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}"
Set Wksheet = Worksheets.Add
Set List = Wksheet.ListObjects.Add(xlSrcExternal, Array(servStr, listNm, viewNm), , Range("A1"))