[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.interop

How to access the contents of data cells in Excel

mookid

7/16/2007 7:59:00 PM

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