Thursday, January 26, 2012 11:02 PM
I am trying to find if there is a solution where you will fill in a .net form that will update a sharepoint list and also a calculate button on the form that will calulate based on formulas written in a Excel spreadsheet and stored in a trusted location. I am trying to start off and wou8ld appreciate some ideas. Please advise for SharePoint 2007.
- Edited by Mike Walsh FIN Friday, January 27, 2012 7:22 AM Do not ask for SP 2010 info in a pre-SP 2010 thread.
Wednesday, February 01, 2012 1:40 AMModerator
you can update SharePoint List with .Net form. You want a calculate button, that will calculate based on formulas written in a Excel spreadsheet and stored in a trusted location. But the formulas is in Excel, so, this is difficult to get it out. If you want calculate the data, I suggest you to define the formulas in your .Net program. If that, it will be more operability. You will develop an web part to wrap your .Net program. I will give you some simple code to update SharePoint list.
public void UpdateItem()
SPSite site = new SPSite("http://jack-7716f30e37:2012/personal/Test/");
using (SPWeb web = site.OpenWeb())
web.AllowUnsafeUpdates = true;
site.AllowUnsafeUpdates = true;
SPList list = web.Lists["A"];
SPQuery query = new SPQuery();
query.Query = @"<Where>
<FieldRef Name='Title' />
SPListItemCollection collection = list.GetItems(query);
foreach (SPListItem c in collection)
c["Title"] = "Jack";
More about SharePoint web part develop:
- Edited by Jack-GaoMicrosoft Contingent Staff, Moderator Wednesday, February 01, 2012 1:42 AM