# Include "Excel. H"
......
......
{
Colevariant vtoptional (long) disp_e_paramnotfound,
Vt_error), vttrue (short) True), vtfalse (short) False );
_ Application * excelapp = new _ application;
Excelapp-> createdispatch ("Excel. application ");
Gettwonum (strfilein );
Filein. Open (strfilein, cfile: moderead );
Setdlgitemtext (idc_num2, m_num2 );
Excelapp-> setvisible (true );
Workbooks excelbook = excelapp-> getworkbooks ();
Sheets excelsheet = excelbook. Add (vtoptional );
_ Workbook;
_ Worksheet;
Range;
Workbook. attachdispatch (excelapp-> getapplication ());
Excelsheet = Workbook. getsheets ();
Worksheet = excelsheet. getitem (colevariant (short) 1 ));
Worksheet. Activate ();
......
......
Cstring filepath = "C: // hello.xls ";
Ccomvariant filename = (_ T (filepath ));
Workbook. savecopyas (filename );
}
......
......
There is no compilation error. When running to Workbook. savecopyas (filename);, "No member is found" appears. How can this problem be solved?
I also want to know how to use the saveas parameters?