title: VBA Export SharePoint Items Data to Excel Spreadsheet
body: <p>Recently I am trying to export the data within each list item on SharePoint to Excel using VBA. Below is the list. </p>
  
  <p><a href="https://i.stack.imgur.com/JKsDu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JKsDu.png" alt="enter image description here"></a></p>
  
  <p>And if you click on each one it looks like:</p>
  
  <p><a href="https://i.stack.imgur.com/p1UvF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/p1UvF.png" alt="enter image description here"></a></p>
  
  <p>So the data I crossed out are the values that I want them to be exported to an Excel Spreadsheet. </p>
  
  <p>I know how to export the whole list of to excel, the code is:</p>
  
  <pre><code>Sub ImportSharePointData()
  
      Dim objMyList As ListObject
      Dim objWksheet As Worksheet
      Const SPServer As String = "http://ln-   sharepoint.XXXintra.net/XXX/XXX/XXX/_vti_bin"
      Const LISTNAME As String = "{06AAB69F-XXX-XXX-XXX-8F677FE38D76}"
      Const VIEWNAME As String = "Agreement"
      ActiveSheet.ListObjects.Add SourceType:=xlSrcExternal, Source:= _
      Array(SPServer, VIEWNAME, LISTNAME), LinkSource:=True, Destination:=Range("A1")
  
  End Sub
  </code></pre>
  
  <p>Now I want data in each individual item in this list e.g. Item with ID 367, exporting the field of Counterparty Name, CSID etc to excel. </p>
  
  <p>Also, it looks like these data are filled in by users into forms on SharePoint that are designed using InfoPath.</p>
  
  <p>Is there anyway that I can do this without using the designer level of access?</p>
  
  <p>Thank you very much in advance for any solution or advice.</p>