Solved

Connect to Sharepoint 2010 list with Excel 2010 using vba code?

Posted on 2012-04-13
5
1,691 Views
Last Modified: 2012-04-13
I have come across links to connect to Excel 2003/2007 with Sharepoint 2003/2007 using vba code. Just wondering how is it different in Sharepoint 2010 and Excel 2010.the goal is to export Sharepoint 2010 list to excel 2010. Any idea?

Thanks.
0
Comment
Question by:dearnemo
  • 3
  • 2
5 Comments
 
LVL 31

Expert Comment

by:Jamie McAllister MVP
ID: 37843095
You can export a SharePoint 2010 list to excel pretty easily. There's an option on the SharePoint ribbon to Open in Excel, and you can open from the Excel end too.

What is the VBA code achieving? Could you explain your requirement a little more, and highlight the links you're following?
0
 

Author Comment

by:dearnemo
ID: 37843279
Hi Jamie,

Thanks for your reply. I can do export Sharepoint 2010 list to Excel 2010 using ribbon interface. Basically it generates .iqy file which is an excel file.
There's a need to automate this process using Excel 2010 vba code instead of click-point ribbon interface. So the Vba code would achieve automating the exporting list items to excel 2010.

Here's the link I was following.
http://sharepoint.stackexchange.com/questions/29021/import-sharepoint-list-into-excel-using-vba-only

Looking forward to your answer. Thanks.
0
 
LVL 31

Accepted Solution

by:
Jamie McAllister MVP earned 500 total points
ID: 37843385
There's no invalid or deprecated feature being used in that code that I can see.

I just used it with Excel 2010 and SharePoint 2010 here and it populates the workbook with the list content as it would have for MOSS 2007.

Hope this answers your question.
0
 

Author Comment

by:dearnemo
ID: 37843574
Hi Jamie,

Thanks a lot. I found out my error. I had provided the full address for SERVER, which was contradicting with strSPServer variable.

Thanks again. Your positive answer boosted my confidence in checking my code again and again to find out the error. Thanks again.
0
 

Author Comment

by:dearnemo
ID: 37844215
Hi Jamie,

 I have some questions on vba. In my SharePoint list I already had ID field. The o/p of the vba code inserted another ID field in the Excel file. So now there are two identical ID fields though the one Excel automatically filled in has ID number starting with 1. I don't want the Excel generated ID and only need the ID field in my SharePoint list. How do I achieve that in the vba code ? Since I am new to vba world, I expect some guidance in this forum.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you create your solutions on SharePoint sooner or later you will come upon a request to set  permissions of the item depending on some of the item's meta-data - the author, people assigned as approvers, divisions, categories etc. The most natu…
For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question