일반

기술자료실에 127번 글에서 질문있습니다..

by 하나 posted Dec 01, 2008
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

위로 아래로 댓글로 가기 인쇄 쓰기 목록 수정 삭제
?
  • WhiteAT 2008.12.02 13:31
    올려주신 내용만 봐서는 Release를 안해 줘서 그런거 같습니다.

    예제를 보면 아래와 같은데, 마지막에   XL.ReleaseExcel()를 해줍니다.
    이렇게 해도 해결이 안된다면 전체 소스를 올려 주세요~~.
    그래야 디버깅을 할수 있습니다.^^

     
    void CWATExcelRWDlg::OnBnClickedButton1()
    {
     char chThisPath[_MAX_PATH];
     GetCurrentDirectory( _MAX_PATH, chThisPath);
     
     UpdateData(TRUE);
     CString strThisPath ;
     strThisPath.Format("%s\%s.xls",chThisPath,m_strFileName);

     CXLEzAutomation XL(FALSE); // FALSE: 처리 과정을 화면에 보이지 않는다


      XL.SetCellValue(1,1,"ddd");
     XL.SetCellValue(1,2,"22");
      XL.SetCellValue(4,4,"4,4");
      XL.SetCellValue(7,4,"7,4");
     XL.SaveFileAs(strThisPath);

     XL.ReleaseExcel();
    }