We have a SharePoint 2007 deployment which will have a substantially large document library. My client wants the ability to export this library to an Excel spreadsheet, but specifically wants the ability to divide the spreadsheet into several worksheets based on a specific field. Is this possible to accomplish in WSS 3.0, through the object model or otherwise?

There is a out-of-the-box Export to Spreadsheet, but it does not appear to support automated subdivision of the list items into separate worksheets. I do not know if Excel Services that come with MOSS are capable of it, but we do not have MOSS so we cannot consider it an option for now.


It seems that by mentioning "out-of-the-box", I am implying that I'd prefer something quick and simple. Let's dispel that. I do a lot of heavy work in the object model. I only mentioned the Export to Spreadsheet because that's the only available method I know of off-hand, and its options are limitted. So I am comfortable with all manner of work level that can be suggested.

I should also note that keeping the list linked with the spreadsheet is undesired. We want to be able to download the spreadsheet as a reference. Because of the number of people who will be working on the list, it would be absolute chaos to try and synchronize all of the linked files. My client has agreed that it'll be easier to handle obsolete copies than to try some synchronized system.

The solution also needs to be deployable. So things which do not tailor to an individual site are best.

2 Answers 2


I would suggest that you create a couple of Views of the list resembling the Excel Sheets, then add a custom action that uses the Open XML SDK to create your Excel files.

  • Using this method, is it necessary to access these views? Or could I just programmatically create them behind the scenes, use aforementioned SDK to create the Excel file, and have no one the wiser of how it was accomplished? If I need to manually access each view through the UI, it will be problematic as the field we are subdividing on can have upwards of 30 values.
    – Grace Note
    Apr 27, 2010 at 12:16
  • No you don't have to create the views. That was just to provide a "preview" of the sheets in the UI. Apr 27, 2010 at 13:03
  • Well, I'll be making the sheets through the object model, so creating views is unnecessary. Thanks for pointing out this SDK, it will work very well.
    – Grace Note
    Apr 29, 2010 at 14:12
  • How are you doing this? Do you have some code sample. I need to automate excel for printing data a certain way and this looks promising. Jun 17, 2010 at 13:24

In MOSS there is no out of the box feature that can accomplish this but using Excel Services it should be easy enough to do.

  • I explicitly stated that MOSS is not an option.
    – Grace Note
    Apr 27, 2010 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.