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

by gigaaks at 2012-10-22 09:29:32


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.
by poshoholic at 2012-10-22 12:09:57
I just copied this topic into the PowerShell and SharePoint forum so that those gurus can give you tips on the SharePoint side of this question. It would also be very helpful if you could share the script that you have so far, or at least relevant parts of it or a similar one that serves as an example, so that we’re answering questions you have that will ultimately help you work out the details.