September 28th, 2009, 02:08 PM
Excel programing in C++
After struggling a little bit, now I am able to write a program to access excel spreadsheets using MFC in VS2005. I am able to create the wrapper and able to access excel files, write data into it by specifying a cell number manually.
Also I can search for data in a given range by using Range.Find() function.
Can someone please tell me how to get the cell number of that specific cell where the data is located.
#define vOpt COleVariant((long) DISP_E_PARAMNOTFOUND, VT_ERROR)
if(range.Find(COleVariant("09/28"), vOpt, vOpt, vOpt, vOpt, (long) 1, vOpt, vOpt))
Also is there any good tutorial or help file where I can refer to for further questions.
Thanks in advance
September 28th, 2009, 04:42 PM
Re: Excel programing in C++
1. No, there is not any really good documentation.
2. The usual way is:
- open Excel
- record a macro with the actions you want to do
- analyze the recorded VBA code and look for a similar functions among generated excel automation classes
Tags for this Thread
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!