0

I'm having an export excel method in my c# code. Earlier I was inserting data into each cells as

WorksheetObj.Cells[rowvalue,colvalue] = "something";

But, Is there a way to insert data into cell using Cell reference, like

WorksheetObj.Cells["A",1] = "Something";

I'm using Excel Interop for the export functionality.

This might be a duplicate, but, I didn't find such solution or post regarding this..

BenMorel
  • 34,448
  • 50
  • 182
  • 322
Sandeep
  • 278
  • 1
  • 6
  • 21

1 Answers1

0

Try this:

WorksheetObj.Range["A1"].Value2 = "Something";
Mitja Bezenšek
  • 2,503
  • 1
  • 14
  • 17