Monday, August 13, 2012

Method 'Post' of object 'IOWSPostData' Failed in Sharepoint 2010

original source:http://makingspwork.blogspot.com/2010/04/method-post-of-object-iowspostdata.html

I'm running Sharepoint 2010 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.


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.
*note: I personally modify both files from 2 folder location.
1. \office12\1033
2. \office14\1033

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.
To modify the file:1. 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.

2. 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:

*Note: If you are using 64-bit Windows, the XLA file is actually under: C:\Program Files (x86)\Microsoft Office\Office12\1033\. If you are running Windows Vista, you will need to run Excel as administrator in order to save the modified file back.

3. 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


4. Comment out this line lVer = Application.SharePointVersion(URL) by adding a single apostrophe ( ' )to the beginning of the line.

5. 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

image


6. 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.

7. Close the VB editor and exit Excel.

8. Using Windows Explorer, navigate to \Program Files\Microsoft Office\Office14\1033.

9. 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).
Some of the blog posts say that you can change the version in the line from lVer = 2 to lVer = 3 and try that too. In my tests, it didn't matter which version you used as long as it was in the version in the \Office14\1033 directory. A modified EXPTOOWS.XLA in the \Office12\1033 folder didn't seem to cause this any ill-effects either.

Sunday, August 5, 2012

Create a customize auto numbering from SharePoint.

Original post from Autonumber Custom List Field
here are the flow:
1. Create a list name "Running Serial" with 2 columns named LastNo and NextNo.
2. Add the list column which hold the auto running number. CIN or RefNo or CustomerNo.
1. Create a workflow variable named "mNumber" or any name preferred.
2. Create a Set workflow variable action with set NextNo from "Running Serial" as a data source. Set Title from "Running Serial" as desire column name (CIN, RefNo or CustomerNo).
3. Create another action with Set field in current item. Choose the auto running number field (CIN or RefNo or CustomerNo). Set value to workflow variable, mNumber.
4. Create a last aciton with Update list item. 
5. Update "Running Serial" LastNo field with mNumber variable.
6. Set Find the list item with "Title" field, set value as "CIN" or "RefNo" or "CustomerNo".
7. Save and publish it.

Saturday, August 4, 2012

Create a public announcement and display to any other sbusite

source from Displaying a SharePoint List from another team site in Sharepoint Foundation 2010
note: SOAP Service is created on each subsite and refer to home site for the list view id.

Create a lookup list from a home site across multiple subsite.

how to allow a list collection to be a lookup to other subsite?
by doing so it eventually reduce the data duplication. For example, if you have a supplier contact, and you want to be a lookup for each subsite.

Create a lookup list from Home site.
1. create the list at your home site.
2. go to Site Actions -> Site Settings.
3. Under Galleries -> Site Columns
4. click on Create
5. give a column name.
6. Click on Lookup(Information already on this site)
7. Under Group section, you use existing group name or create a new group name. E.g: "Home Lookup Group".
8. As usual, create your lookup list refer from list collection and columns.

Setup a lookup list from existing site column.
1. Create a new content in any type or from existing content type.
2. Create lookup column with "Add from existing site columns".
3. Choose from the group you created.
4. click the "Add >" button from "Available site columns" to Columns to add".
5. Click OK to save.

SharePoint Date time format for Web Application Site

Default date time format for each site collection is English(United State). Which means the format is mm/dd/yyyy. To Have your site for different format e,g: dd/mm/yyyy, follow steps bellow:
1. Go to Site Actions -> Site Settings
2. Under Site Administration -> Regional Settings.
3. Change your Locale to English(United Kingdom).
4. Save it.

Open files in application or web browser from SharePoint

Note: This only work with Libraries type. Not List or custom list attachment.

For every document libraries, If you want to have your document being open from native application or web browser, here are the steps:
1. from the Ribbon, go to Libraries -> Libraries Settings.
2. Click on Advanced Settings
3. look for a section call Opening Documents in the Browser.
4. Choose Open in the client application OR Open in the browser.
5. save it.

Also make sure enable Permissive form Browser File Handling under Web Application General Setting from the Sharepoint Admin Central.