Tuesday, August 23, 2011

Upload files from local machine to SharePoint document library Automatically (DOS command)

From research I have found so many ways to upload files / documents from File server or from local desktop to SharePoint document library. There are lots of JavaScript available to achieve this goal.
But using these methods end user definitely becomes crazy.
Here I have used a very simple method which automatically uploads document from source folder to SharePoint document library.
Following steps we have to implement to use this method.
·        On your machine map a SharePoint site, make sure to create a mapped drive of SharePoint site (not a network place)
·        This will assign a letter to site (i.e. Z), and this will create a SharePoint site as a folder.
·        So now we have “Z” drive which contains our SharePoint site and all its content and when you navigate to any of the content make sure it will open a folder with “z:\content folder” (as simple as opening a local folder in C / D drive)
·        Now we have two local drives one is Source folder and one is SharePoint site.
·        Now run following command to check whether we are able to copy documents from one location to another (From local source folder to SharePoint site)

COPY “sourcefolder\filename” “destination (SharePoint Site)”

Copy c:\Pratik\*.* z:\Documents

·        (Above command will copy all files from “C:\Pratik” folder to SharePoint site)
·        If this will be done successfully then simply create a batch file which copies documents on a click
·        And to make this click automated put that batch file in windows task scheduler so that @ a specific time frame it will run and picks up document from local source folder and uploads it to SharePoint site.
·        You might face some issues while making map drive, to resolve it follow these steps
On Windows XP machine
·        Right click “My Computer” > Map Network Drive
·        It will open a wizard, provide SharePoint site name with UNC path (i.e file://servername/folder)
·        If you will get any error please chec webclient is activated on the machine.
On Windows 7 machine
·        Right click “My Computer” > Map Network Drive
·        It will open a wizard, provide SharePoint site name same as you provide in explorer address bar (http://sitename/)
Suggations and feedbacks are always welcome J. Feel free to reach me n case of any issues.

Thursday, August 4, 2011

Excel file is opening with “Unable to Load Workbook” in browser

Error: Unable to Load Workbook
The workbook that you selected cannot be loaded because it contains the following features that are not supported by Excel Services:

Comments, ActiveX controls, Shapes, Text Boxes, Pictures, WordArt, Clip Art, Embedded OLE objects, Ink Annotations, Forms Toolbar controls, Control Toolbox controls, Charts that are part of a group, Signature Lines, or Camera objects

Contact the workbook author.

Learn more about what features are not supported by Excel Services…


I removed Text Boxes, Clip Arts, Shapes but no luck still got the same error.
Also removed formulas but error remained same. Followed all possible ways to get rid of this error and checked for all possible root causes mentioned in above error but did not get success.
Finally found one column using a formula “SUMPRODUCT” and it was referring another excel sheet.
Copied data of that column pasted it as a value and removed formula.
Saved the file
Uploaded again it to document library
And then we were able to view that excel file in browser.

Popular Posts

Disclaimer

The opinions expressed on this blog are the personal views of Pratik's SharePoint Blog, and do not represent or reflect the viewpoints or policies of any past, present, or future employer, colleague, or customer, or any other entity. The posts on this blog are provided ‘as is’ with no warranties, express or implied, and confer no rights. Use of information contained within this blog, including specific technical steps mentioned herein, is at your own risk. References to specific software products, processes, resources, or companies do not imply any endorsement.