Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update/Add a row in an excel file available on sharepoint

Status
Not open for further replies.

gigaaks

Technical User
Oct 22, 2012
2
US
Hi

I have to maintain an excel file available on our company's sharepoint site. Lets say it exists at the following link:

http:// some server /somelocation/ excelfile.xls

Excel file just have one single sheet "Sheet1".

Sheet1 has a the following columns (and rows containing valid values) which stores access information for a repository/project/platform etc. See attached image.

What I'm looking for is to:
1. Checkout this file.
2. Add/update (if userid already exists) in this excel file.
3. Checkin the file back.


for ex:
If my powershell script is "update_sp_excel", then, if I'm passing:

update_sp_excel -userid:u654321 -action:modify -field:Status -value:Active

then, this script should checkout the file from Sharpoint, update the last line in the excel file and set the Status to Active for user "u654321" and finally checkin the file.

If I pass:
update_sp_excel -userid:u666666 -vcs:Mercurial -project:AEIH -module:Skrono -platform:Linux -repository:/a/b/c/d -Access:RW -action:add -Date:"10/16/2012 14:00:00 MT" -status:Inactive

then, this script should checkout the file from Sharpoint, add a new entry in the excel file's sheet "Sheet1" as per the values passed above to the script and finally checkin the file.


Any help. If not the full script but atleast on how to checkout a file from sharepoint link, edit/add a row and checkin it back. Thanks.
 
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top