Wednesday, January 20, 2010

Error Restoring a Folder from the Recycle Bin

Trying to restore a folder that was deleted gives this error in SharePoint:

File Not Found. at Microsoft.SharePoint.Library.SPRequestInternalClass.RestoreRecycleBinItem(String bstrWebUrl, Guid gItem)
at Microsoft.SharePoint.Library.SPRequest.RestoreRecycleBinItem(String bstrWebUrl, Guid gItem)
at Microsoft.SharePoint.SPRecycleBinItemCollection.RestoreCore(Guid[] ids)
at Microsoft.SharePoint.SPRecycleBinItemCollection.Restore(Guid[] ids)
at Microsoft.SharePoint.ApplicationPages.RecycleBinPage.ProcessAction(String action, String guidString)
at Microsoft.SharePoint.ApplicationPages.RecycleBinPage.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


Actually it is a simple error to fix. The Folder that has to be restored was nested inside a "Parent" folder. The "Parent" Folder was then renamed or deleted. To restore the Folder, create the "Parent" folder as per the "Original Location" displayed in the Recycle Bin.

And Restore... Done...

Friday, January 15, 2010

Method 'post' of object 'IOWSPostData' failed

I came across this curious error today. This error pops up when a user (Office 2007) wants to import a spread sheet into a custom list (SharePoint 2007).

Further investigation (Google) revealed that it is a macro inside Office 2007 that is causing the problem. Exactly why, I don't know. But here is my work around, use at your own risk ;-).

Make a backup of the file and edit the file in "C:\Program Files\Microsoft Office\Office12\1033\EXPTOOWS.XLA" (with Excel):

1. Open the file with Excel
2. Press F11
3. Locate the following code:
....
aTarget(iPublishDesc) = Title
lVer = Application.SharePointVersion(URL)
End Sub
....
4. Insert right after: lVer = Application.SharePointVersion(URL)
the following line: lVer = 3
5. Save the file EXPTOOWS.XLA

Make sure you overwrite the file.

That's it! Anyone welcome to leave a comment as to why this happens, or what the consequences would be if you edit the EXPTOOWS.XLA file.