Tuesday, January 22, 2008

Import Spreadsheet with Sharepoint error

A customer ran into a problem where he is getting "Method 'Post' of object 'IOWSPostData' failed" when trying to create a sharepoint list via importing a SpreadSheet using Excel.  There are plenty of posts on the Internet about this and the fix is to update EXPTOOWS.XLA to force a different version number.

The original macro code uses a new method in the Excel 2007 object model Application.SharePointVersion(URL).  That method is returning 0 in the customer's environment causing spreadsheet import not to work.

As it turns out, Application.SharePointVersion checks the root site for a Sharepoint site to determine the version.  Because for this particular environment setup, I do not have a valid Sharepoint site at the root, it does not return the correct version number.

The solution was to create a dummy blank sharepoint site at the root of a web site and now users can import spreadsheets and create list using spreadsheets for all sites (root and sub site).

1 comment:

Bryceu said...

Hallalujah! A root cause for the problem!

Related to this was Explorer View not functioning.

Once I created a site at the root level (blank in this case) it resolved both my Explorer View issue as well as the spreadsheet import that you spoke of.

Many thanks.