Background
I'm running Sharepoint 2010 (the release candidate) and Office 2007. I confirmed this error message does not occur if you're running Sharepoint 2010 and Office 2010, only when the environments are mixed.
- From your site, open All Site Content. Click Create and select Import Spreadsheet. Give the list a name and navigate to the file location.
- Choose Range of Cells and select the range on the spreadsheet.
- Click Import. The following error message will appear:
- The same error will appear if you select a Named Range or a Table Range.
I found several other folks (here and here are the best examples) had had this problem as well, but none of their fixes had worked for me because I had a hybrid environment of 2010 and 2007. I'm guessing that other folks will encounter this problem too, because big companies don't often migrate Office all at once, especially while they're evaluating new products like Sharepoint 2010.
All of the posts I'd read about this problem suggested editing the Excel Add-in file EXPTOOWS.XLA located in the \Program Files\Microsoft Office\Office 12\1033 folder. But editing that file didn't help me a bit. Turned out there's another version of that same file in \Program Files\Microsoft Office\Office14\1033, and that was the one that needed editing in my case.
Before you begin, a few notes for the uninitiated:
- EXPTOOWS.XLA is a hidden file. In order to find it, you'll have to show all hidden files on the system. Do this through the Control Panel, Appearance and Personalization, Folder Options, Show Hidden Files and Folders.
- The 1033 folder is read-only, so you 1) must be an administrator to write to the folder and 2) can't just edit the file and save it back to the same directory.
- Once you've found the file, rename it to OldEXPTOOWS.XLA (this will give you a backup in case something happens). You may be prompted to confirm the change because this is a read-only folder.
- Double-click on OldEXPTOOWS.XLA. This will open Excel but it will look like nothing else is happening. On your keyboard, press ALT-F11 to open the built-in Visual Basic editor. It will look something like this:
- Open the code window and scroll until you find this section:
Sub Initialize(List, Title, URL, QuickLaunch)
strQuickLaunch = QuickLaunch
aTarget(iPublishURL) = URL
aTarget(iPublishListName) = List
aTarget(iPublishListDesc) = Title
lVer = -1 ' can't tell STS server version
If Val(Application.Version) >= 12 Then
lVer = Application.SharePointVersion(URL)
End If
End Sub - Comment out this line lVer = Application.SharePointVersion(URL) by adding a single apostrophe ( ' )to the beginning of the line.
- Add a line immediately beneath the commented line that reads lVer = 2 (that's an L, as in lollipop). The section will now look like this (I have highlighted the changes):
Sub Initialize(List, Title, URL, QuickLaunch)
strQuickLaunch = QuickLaunch
aTarget(iPublishURL) = URL
aTarget(iPublishListName) = List
aTarget(iPublishListDesc) = Title
lVer = -1 ' can't tell STS server version
If Val(Application.Version) >= 12 Then
' lVer = Application.SharePointVersion(URL)
lVer = 2
End If
End Sub - Click File, Save. You will get an error message that the file is Read Only. Click OK to continue. A Save As dialog will appear. Change the file type to Excel Add-in (.xla). When you do this, the file location will change to the Excel addin directory - you will want to save the file to somewhere you can remember (like the Desktop). Make sure you've named it EXPTOOWS.XLA.
- Close the VB editor and exit Excel.
- Using Windows Explorer, navigate to \Program Files\Microsoft Office\Office14\1033.
- Copy the new file (EXPTOOWS.XLA) from your Desktop (or wherever you saved it) into \Office14\1033. You will be prompted to confirm this action.
- When the new file is in the \Office14\1033 folder, you should be able to import the spreadsheet into Sharepoint 2010 (although you may have to restart IE or the Sharepoint session).
The code in the file reads:
ReplyDeleteSub Initialize(List, Title, URL, QuickLaunch)
strQuickLaunch = QuickLaunch
aTarget(iPublishURL) = URL
aTarget(iPublishListName) = List
aTarget(iPublishListDesc) = Title
End Sub
It does not have the:
lVer = -1 ' can't tell STS server version
If Val(Application.Version) >= 12 Then
lVer = Application.SharePointVersion(URL)
End If
Should I enter all of the code you have listed above?
Worked for me. Thank you
ReplyDeleteWe have a user that is experiencing this issue but my environment (SharePoint 2010 on Windows Server 2008 R2) does not have the folder "\Program Files\Microsoft Office\Office14\1033". There is a folder "\Program Files\Microsoft Office Servers\Office14\1033" but it does not contain the file in question and a search did not find it on the machine at all (as an administrator, with "Show Hidden Files and Folders"). The user having the issue is logging in to the SharePoint site using Forms Authentication - this does not appear to be an issue for users logging in using Window Authentication. Any ideas?
ReplyDeleteNever mind - read some other posts that clarified (for my pea brain) that this need to be done on the CLIENT not the server. Will try that if I can get access to the users system.
ReplyDeleteworked for me..IE8, Excel 2007, SharePoint 2007
ReplyDeleteI get error: "Cannot connect to the server at this time. Your table cannot be published."
ReplyDeleteUpdate: Figured it out. Amazingly this will only work when importing to the root site (not to a sub site). So import to root site, then save as list template, then create in sub-sites.
ReplyDeleteI make these changes but get the error "Object Variable or With Block variable not set". Any ideas?
ReplyDeleteWorked for me. SP 2010 & Office 2007. Thank you very much!!
ReplyDelete