Inserting .dwg file in excel opens the drawing in autocad...

M

Mohan

Hi All
when I try to insert .dwg file in excel using oleobjects add method it opens
the drawing in autocad and inserts blank space for the image the code which i
an using is as under..


ExcelWorksheets sheets = book.GetWorksheets();
_ExcelWorksheet s;

lpDisp3 = oExcel.GetActiveSheet();
ASSERT(lpDisp3);
s.AttachDispatch(lpDisp3);
//filename = D:\test.dwg;
OLEObjects ole = s.OLEObjects(covOptional);
ole.Add(covOptional,(COleVariant)filename,
covFalse,covFalse,covOptional,covOptional,covOptional,covOptional,covOptional,covOptional,covOptional);

Also i am using excel8.h and excel8.cpp files to get the objects of
woorksheet and workbooks

any help will be greatfull
 

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