ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Calling Excel user defined function from C# (https://www.excelbanter.com/excel-programming/365373-calling-excel-user-defined-function-c.html)

Stanley

Calling Excel user defined function from C#
 
Hi,

I have an excelsheet with a function called FillCell1:

Public Function FillCell1()
Range("C9").Select
ActiveCell.FormulaR1C1 = "10"

End Function

This functions enters the value "10" in cell "C9". I would like to call this
function from a C# application. Is this possible? I heard that this is
possible but when i look for some examples on the internet i can't hardly
find such examples.
Can someone help me with this?
I know how to open an excelsheet and enter a value through the excel object.
The point is that i already have an existing sheet in which code is written
to enter the value in the cell, so i don't want to write that piece of code
in my C# application again but just want to call this function to do so.

Thanks,

Stanley


All times are GMT +1. The time now is 01:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com