DSOFramer in MFC Dialog
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
Hi, I am using the DSOFramer control in an MFC dialog to display an excel chart. I have figured out how to run it and start with an excel worksheet and chart that I can modify to look how I want. Now I need two more tabs added (one with a worksheet and one with a chart)...I am using the following and it gives me an error that the Add function failed. COleVariant covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR); _Workbook wb; Worksheets wsSet; _Worksheet ws; LPDISPATCH lpDisp = m_FrameControl.GetActiveDocument(); wb.AttachDispatch(lpDisp); wsSet = wb.GetWorksheets(); ws = wsSet.Add(covOptional,covOptional,covOptional,COleVariant("Excel.Sheet")); Thanks in advance for your help! Jen