How to access the contents of data cells in Excel
I have made a toolbar plugin for Excel using C#.NET interop.
As far as I can tell, the only way to read/write the contents of cells
is something like this:
Range r = Excel._Application.Cells.Cells[row, col] as Range;
string text = r.FormulaLocal as string;
i.e. by extracting a Range, which contains only one cell, and then
using the properties on that Range object to set/get the data.
This way seems to be horribly slow however, so I'm wondering if anyone
can tell me how to do it faster?
Thanks in advance.
Best regards,
Mogens
Date:Mon, 16 Jul 2007 12:59:26 -0700
Author:
|