using excel from c#

M

mp

anyone know good sites/ngs for using excel interop from c#?

I can connect to excel/book/sheet/cells but am having trouble
finding info on many basic things.

most of my searches turn up vb and vba solutions and some of them
i can't figure how to convert to c#

i'd think by now there would be sites with common conversions information
thanks
mark
 
L

Lynn McGuire

anyone know good sites/ngs for using excel interop from c#?

I can connect to excel/book/sheet/cells but am having trouble
finding info on many basic things.

most of my searches turn up vb and vba solutions and some of them
i can't figure how to convert to c#

i'd think by now there would be sites with common conversions information
thanks
mark

I can supply you with a large amount of generic C++ code for
talking with Excel if you want. I dont use import or anything
else so my code works with all versions of Excel using very
plain OLE automation.

Lynn
 
M

mp

Lynn McGuire said:
I can supply you with a large amount of generic C++ code for
talking with Excel if you want. I dont use import or anything
else so my code works with all versions of Excel using very
plain OLE automation.

Lynn

wow! I appreciate the offer.
I'm sure i'd learn lots by looking at whatever you are willing to share.
I don't know how difficult it would be for me to convert the c++ to c#...I
only read a book on C++ some years ago and it was beyond my abilities at the
time and my time available to study it...

Some of the things i was recently having trouble finding was equivalents of
some of the constants like those for the cell.find method
took me a while to find things like
xlPart = Excel.XlLookAt.xlPart;
xlFormulas = Excel.XlFindLookIn.xlFormulas;
xlByRows = Excel.XlSearchOrder.xlByRows;
xlPrevious = Excel.XlSearchDirection.xlPrevious;

once i realized that the enums were buried in another enum it became easier
of course but at first it was hours of fruitless searching and frustration
to do a simple thing

I've started a class ExcelReader to encapsulate all the usages i'll need at
this point...that way i can use it in any projects where i want to access
excel data....it's always easier to remember how to use my own class, once i
have it implemented, than to remmeber all the specific calls to another api
that i don't use all that often.

Anyway I'd love to see what you're referring to and have a wonderful holiday

thanks

mark
 
L

Lynn McGuire

wow! I appreciate the offer.
I'm sure i'd learn lots by looking at whatever you are willing to share.
I don't know how difficult it would be for me to convert the c++ to c#...I
only read a book on C++ some years ago and it was beyond my abilities at the
time and my time available to study it...

Some of the things i was recently having trouble finding was equivalents of
some of the constants like those for the cell.find method
took me a while to find things like
xlPart = Excel.XlLookAt.xlPart;
xlFormulas = Excel.XlFindLookIn.xlFormulas;
xlByRows = Excel.XlSearchOrder.xlByRows;
xlPrevious = Excel.XlSearchDirection.xlPrevious;

once i realized that the enums were buried in another enum it became easier
of course but at first it was hours of fruitless searching and frustration
to do a simple thing

I've started a class ExcelReader to encapsulate all the usages i'll need at
this point...that way i can use it in any projects where i want to access
excel data....it's always easier to remember how to use my own class, once i
have it implemented, than to remmeber all the specific calls to another api
that i don't use all that often.

Anyway I'd love to see what you're referring to and have a wonderful holiday

thanks

mark

Posted in a new email.

Lynn
 

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