Help!!!!!! - Find Function not working from C#

A

andyblum

I have been enjoying Excel programming but am now hitting a wall. I
simply want to transfer all data from the spreadsheet at runtime. The
spreadsheet is read ever 1 secs on a timer as it has real-time
streaming data inside of it.

I figured the first step was to dynamically figure out a range address
then simply get that range and assign the values to an arraylist.

How do I dynamically figure out a range to do this. The find function
is throwing a COM Interrupt message.

Here is my Find Call

int iMaxRows = excelWorksheet.Cells.Find("*", "A1",
Excel.XlFindLookIn.xlValues, Excel.XlLookAt.xlPart,
Excel.XlSearchOrder.xlByRows, Excel.XlSearchDirection.xlPrevious,
false, false, Type.Missing).Row;

It throws a type mismatch on the third to last argument which is
MatchCase an object.
Ive tried

1. Type.Missing
2. 0
3. Declare object var = false and use var

None of it works. Any Suggestions?????

Thank You in advance for reading and hopefully solving.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top