richard smith

richard smith

  • 1.3k
  • 285
  • 157k

Programmatic-ally write from C# to Excel

Mar 12 2013 7:40 PM
I am pulling data from a SQL Server Database into a C# datagrid.  I then want to take C# to write into column A1 - R1 information about what is being pulled into the Excel, for example the data would be like this (A1) ID, (B1) Phone Number, (C1) Email etc etc

The only examples I have been able to find thus far show how to write cell by cell, but there has to be a way to just assign a value like you would do in Excel VBA:
FormulaR1C1 = "ID"



Can someone please provide me with a way to perform this daunting task?

Answers (5)