0

I have tried this

How do I get an Excel range using row and column numbers in VSTO / C#?

but it throw an undefined com exception

what I would like is something like (pseudocode)

Range myRange = new Range(new cell(1,1), cell(3,3));

so that I can then use it with (pseudocode again)

ws.myRange.Interior.Color = XlRgbColor.rgbDarkGray;

thank you

2
  • Did u check my example ? Commented Feb 9, 2016 at 14:34
  • Yep sorry for being late Commented Feb 11, 2016 at 8:51

1 Answer 1

0

Please check that out:

Range range1 = ws.Range[ws.Cells[1, j], ws.Cells[1, j+1]];

Here, Range is :

Microsoft.Office.Interop.Excel.Range
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.