I understand how to import data from an Excel file into a SharePoint list. We have a problem where we have 200-300 Word docs, each consisting of 3 or 4 tables of information. I want to get this information into a single list in SharePoint without having to convert and clean the data in excel first.

  • Steve what sort of schema do these documents conform to? Could we see a sample? Would it be ok if I wrote a PowerShell script for you to do this or maybe a C# executable? – Robert Kaucher Mar 21 '12 at 17:32

In order to do this you'll need to have Word installed on the box you'll be running this solution from. If you're wanting to push this directly from Word to SP in one fell swoop, that means installing Office onto one of your servers. From there you're going to need to utilize the Word.Interop API to open and read the Word document, figure out how to read your tables into memory (if they're saved as HTML, it should be a simple matter of doing a string split on the and elements; if they're not... I'm afraid I don't know off-hand how to read tables out of Word), and then either import the table data directly into SP lists or use the Excel.Interop API to bring the data into Excel spreadsheets which you can then upload as documents into a library.

With 3-400 documents I could still see where this would be a lot faster than manually copying and pasting each and every table into Excel and then uploading the spreadsheets to SharePoint, but it's still by my estimation going to take you a while...

|improve this answer|||||

You would have to build a script that pulls the tables from your documents and write them back to SharePoint. This could be done with a macro, but to me it seems to be more work than just moving the content from Word to Excel or Access, then pushing it to SharePoint.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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