Excel Formulas

  • Thread starter Thread starter angelo \(ac\)
  • Start date Start date
A

angelo \(ac\)

How to use exel formulas (statistic) in a vb.net poject?

Thanks in advange

Angel (AC)
 
Assuming it's on Excel Sheets...make a refernece to the
Excel .dll and make sure you include a using
System.Runtime.COMinterop directive in C# or Imports
System.Runtime.COMInterop

Create your workbook, worksheet objects and then just use
Cell formula like this ActiveCell.FormulaR1C1 = "=SUM(1,1)"

Where active cell is something you'd predefine beforehand
ie Range("A2").Select . This makes A2 the active cell

Good Luck,

Bill

W.G. Ryan
(e-mail address removed)
www.knowdotnet.com
 
Thanks /// Angel
William Ryan said:
Assuming it's on Excel Sheets...make a refernece to the
Excel .dll and make sure you include a using
System.Runtime.COMinterop directive in C# or Imports
System.Runtime.COMInterop

Create your workbook, worksheet objects and then just use
Cell formula like this ActiveCell.FormulaR1C1 = "=SUM(1,1)"

Where active cell is something you'd predefine beforehand
ie Range("A2").Select . This makes A2 the active cell

Good Luck,

Bill

W.G. Ryan
(e-mail address removed)
www.knowdotnet.com
 
Back
Top