Thursday, July 1, 2010

Exporting SharePoint Document Library and Lists to Excel, including attachments

Exporting SharePoint lists to Excel, including attachments

One thing to note from the code provided by Bjørn Furuknap is that before creating the SPFolder object, we need to ensure the list item has attachment, if not, then creating SPFolder object causes exception. I used
SPListItem.Attachments.Count 
to check the exisence of attachment or not.


Here is a codeplex project you can download for downloading SharePoint document library into a zip file.