Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2012-04-13
5
Medium Priority
?
1,788 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 32

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 32

Accepted Solution

by:
Jamie McAllister MVP earned 2000 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

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…
Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

715 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