Spire.XLS for .NET is a professional Excel .NET library that can be used to any type of .NET( C#, VB.NET, ASP.NET, .NET Core) application, both ASP.NET web sites and Windows Forms application.

Fri Nov 26, 2010 9:42 am

Hello.

Let's say, cell A1 contains a function (=SUM(B1:C1)). How can i copy just the summary of cell A1, maybe as text, to another cell? If i use Range.Copy(), it copies the whole function to the new cell...

Regards

dfense
 
Posts: 12
Joined: Tue Jan 20, 2009 2:35 pm
Location: Frankfurt, Germany

Sun Nov 28, 2010 3:15 pm

Hello dfense,

Thank you for your inquiry.
You can try to following way to copy formula to new cell as text.
Code: Select all
sheet.Range["E5"].Text =  sheet.Range["B5"].Formula;

Please let me know if you have any questions and concerns.

Best Regards
Jason Tan
Technical Support / Developer,
e-iceblue Support Team
User avatar

Jason.Tan
 
Posts: 30
Joined: Tue May 25, 2010 7:17 am

Mon Nov 29, 2010 12:47 pm

Are you sure that you mean it this way? If i would set the text property of the destination cell to the source formula, it would just display "=SUM(B1:C1)" as text, not the calculated value.

dfense
 
Posts: 12
Joined: Tue Jan 20, 2009 2:35 pm
Location: Frankfurt, Germany

Tue Nov 30, 2010 1:45 pm

Hello,

Sorry for confuse to you.
Your requirement can work ground with calculation engine of workbook, the new features will be release in next version.
Please let me know if you have any questions and concerns.

Best Regards.
Jason Tan
Technical Support / Developer,
e-iceblue Support Team
User avatar

Jason.Tan
 
Posts: 30
Joined: Tue May 25, 2010 7:17 am

Return to Spire.XLS

cron