B
bravehao
I want put some data in the spreadsheet, so I put a OWC spreadsheet control
in my dialog. some classes used showes below
CSpreadsheet:: m_MyCSpreadsheet derived from CWnd
CRange, CWorksheet derived from COleDispatchDriver
with a button on that dialog to tirgger a event:
void Cex1Dlg::OnBnClickedButton1()
{
COleVariant covOptional(DISP_E_PARAMNOTFOUND,VT_ERROR);
CWorksheet ws(m_MyCSpreadsheet.get_ActiveSheet());
CRange range(ws.get_Range(COleVariant("A1"),COleVariant("A1")));
range.put_Value(covOptional,COleVariant("567"));
range.get_Next();
}
the last sentence throw out a exception DISP_E_MEMBERNOTFOUND to me
here is the interface for Next() in CRange.h
LPDISPATCH get_Next()
{
LPDISPATCH result;
InvokeHelper(0x60020046, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result,
NULL);
return result;
}
I am not sure it is one of the three reasons mentioned in MSDN for this
exception.
please give some help, thanks in advance!
in my dialog. some classes used showes below
CSpreadsheet:: m_MyCSpreadsheet derived from CWnd
CRange, CWorksheet derived from COleDispatchDriver
with a button on that dialog to tirgger a event:
void Cex1Dlg::OnBnClickedButton1()
{
COleVariant covOptional(DISP_E_PARAMNOTFOUND,VT_ERROR);
CWorksheet ws(m_MyCSpreadsheet.get_ActiveSheet());
CRange range(ws.get_Range(COleVariant("A1"),COleVariant("A1")));
range.put_Value(covOptional,COleVariant("567"));
range.get_Next();
}
the last sentence throw out a exception DISP_E_MEMBERNOTFOUND to me
here is the interface for Next() in CRange.h
LPDISPATCH get_Next()
{
LPDISPATCH result;
InvokeHelper(0x60020046, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result,
NULL);
return result;
}
I am not sure it is one of the three reasons mentioned in MSDN for this
exception.
please give some help, thanks in advance!