SharePoint List front end and Excel Calculation services as backend
-
Thursday, January 26, 2012 11:02 PM
Hi,
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.
Santhan Rangarajan- 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.
All Replies
-
Wednesday, February 01, 2012 1:40 AMModerator
Hi Santhan,
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>
<Eq>
<FieldRef Name='Title' />
<Value Type='Text'>Tom</Value>
</Eq>
</Where>";
SPListItemCollection collection = list.GetItems(query);
foreach (SPListItem c in collection)
{
c["Title"] = "Jack";
c.Update();
}
}
}
More about SharePoint web part develop:
http://www.codeproject.com/Articles/36792/Developing-and-Deploying-Custom-Web-Parts-for-Shar
Thanks,
Jack
- Edited by Jack-GaoMicrosoft Contingent Staff, Moderator Wednesday, February 01, 2012 1:42 AM

