'WorkbooksPtr'에 해당되는 글 1건

  1. 2009.05.04 Header paragraph for importing Excel

헤더 파일에
 
#import "C:\Program Files\Common Files\Microsoft Shared\Office12\MSO.DLL"       rename("RGB","_RGB")
#import "C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\VBE6EXT.OLB"
#import "C:\\Program Files\\Microsoft Office\\Office11\\EXCEL.EXE" \
      rename("RGB","_RGB") \
      rename("DialogBox","_DialogBox") \
      rename("CopyFile","_CopyFile") \
      rename("ReplaceText","_ReplaceText") \
      exclude("IFont","IPicture","_IMsoDispObj")

....

실제로 사용하는 코드 예시 :  

 Excel::_ApplicationPtr m_Excel;
 m_Excel.CreateInstance(L"Excel.Application");
 m_Excel->put_Visible(0, VARIANT_TRUE);

 Excel::WorkbooksPtr books = m_Excel->Workbooks;
 m_Workbook = books->Add();
 m_Worksheet = m_Workbook->Worksheets->Add(); 
Posted by 김모작자

댓글을 달아 주세요