出现'Post'方法不能应用于对象'IOWSPostData'

来源:互联网 发布:图像识别传感器 淘宝 编辑:程序博客网 时间:2024/06/04 18:11
Importing lists from Excell 2007 returns a Method 'Post' of object 'IOWSPostData' failed dialog. Again, not really a problem with WSS 3.0 but rather the result of a failed Application.SharePointVersion() call in the Excel Add-In which results in Excel attempting to use the IOWSPostData.Post() method to publish the Excel range which is used with SharePoint Team Services 1.0. By forcing the version lookup result variable to 2 or greater, Excel will use SOAP to communicate with WSS 3.0 and the publish request will be successful. To make this change, open the Excel Add-In EXPTOOWS.XLA locate in C:/Program Files/Microsoft Office/Office12/1033 by default. Press Alt+F11 to display the Visual Basic code editor and search (Ctrl+F) for the line lVer = Application.SharePointVersion(URL). Comment out that line with a single quote and add the line lVer=2 so your Intialize() method should now look like this:
Sub Initialize(List, Title, URL, QuickLaunch)
strQuickLaunch = QuickLaunch
aTarget(iPublishURL) = URL
aTarget(iPublishListName) = List
aTarget(iPublishListDesc) = Title
lVer = Application.SharePointVersion(URL)
lVer = 2
End Sub