C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[20430] [질문]좀 도와주세요~~
이용주 [] 771 읽음    2002-07-26 18:14
조금 막연하게 제가 질문을 한것같네요^^
그래서 지금까지 짠 소스를 올리겠습니다. 여기에서
엑셀의 간격을 조절시키는 방법만 갈켜주세요~
부탁드립니다.

Variant Books, App, xlSheet, VRange;

     App   = Variant::CreateObject("Excel.Application");//엑셀열기
     App.OlePropertySet("Visible", true);//엑셀보이기
     Books = App.OlePropertyGet("Workbooks");//
     Books.OleProcedure("Add");//북추가
     Books = Books.OlePropertyGet("Item", 1);//북에서 아이템 얻어옴.
     xlSheet = Books.OlePropertyGet("Worksheets");//워크시트를 염
     xlSheet = xlSheet.OlePropertyGet("Item", 1);//첫번째워크시트를 얻어옴.
     VRange = xlSheet.OlePropertyGet("Range", "A1");
     VRange.OlePropertySet("Value", pRxPhoneState->Caption.c_str());
     VRange = xlSheet.OlePropertyGet("Range","D1");
     VRange.OlePropertySet("Value", pRxTime->Caption.c_str());

     int Row_Count=1;

     while( sgRxResult->Cells[0][Row_Count] != "" )
     {
        Row_Count++;
     }

     for(int rowcnt=3; rowcnt<Row_Count+2; rowcnt++)
     {
        char    cmd[10], cmd1[10];
        char    a[10];

        memset((void*)a, 0, 10);
        memset((void*)cmd, 0, 10);
        memset((void*)cmd1, 0, 10);

        strcpy(cmd,"A");
        strcpy(cmd1,"D");
        itoa(rowcnt, a, 10);
        strcat(cmd,a);
        strcat(cmd1,a);

        VRange = xlSheet.OlePropertyGet("Range", cmd);
        VRange.OlePropertySet("Value", sgRxResult->Cells[0][rowcnt-3].c_str());
        VRange = xlSheet.OlePropertyGet("Range", cmd1);
        VRange.OlePropertySet("Value", sgRxResult->Cells[1][rowcnt-3].c_str());
     }

여기에서 엑셀의 세로 셀의 간격을 조절하고 싶거든요. 좀 도와주세요~


+ -

관련 글 리스트
20430 [질문]좀 도와주세요~~ 이용주 771 2002/07/26
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.