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
[65300] 엑셀 사용을 위한 선언은 어떤 것이 있나요?
갈라파고스인 [fran0416] 1032 읽음    2011-10-12 08:58

안녕하세요,



엑셀 파일을 읽거나 쓰기 위해 선언해야 할 것이 뭐가 있을까요?



아래와 같은 코드를 인터넷 뒤져서 찾았는데요.. excel, Visible, Workbooks, Open, Sheets... 등등을 undefined symbol이라고 에러를 주네요....



참고로 win7에 엑셀은 2007입니다.






void __fastcall TForm1::Button6Click(TObject *Sender)
{

//declaration of variables of type variant
 Variant XL,v0,v1,vcell;

//a string where you will temporarily put the content of a single Cell
 AnsiString tmp;

//create an object which is an excel application and store it to XL
 XL=Variant::CreateObject(”excel.Application”);

//Set the Excel Application as invisible once you have opened it
 XL.OlePropertySet(”Visible”,false);

//Get the workbooks while has a path stored in “file” variable and open it.
 XL.OlePropertyGet(”Workbooks”).OleProcedure(”Open”,file);

//Get the Sheet which has a title “Sheet1″
 v0=XL.OlePropertyGet(”Sheets”,”Sheet1″);

//Get the Cells of that particular Sheet.
 v1=v0.OlePropertyGet(”Cells”);

//Get the content of the Cell located at row 2 and column 3
 vcell=v1.OlePropertyGet(”Item”,2,3);

//store that content to ansistring “tmp”
 tmp=vcell.OlePropertyGet(”Value”);

XL.OleProcedure(”Quit”);
 XL=Unassigned;
}


</a></td>

+ -

관련 글 리스트
65300 엑셀 사용을 위한 선언은 어떤 것이 있나요? 갈라파고스인 1032 2011/10/12
65309     Re:엑셀 사용을 위한 선언은 어떤 것이 있나요? 이성제 1069 2011/10/12
65313         Re:Re:엑셀 사용을 위한 선언은 어떤 것이 있나요? 문경재 1059 2011/10/13
65331             Re:Re:Re:엑셀 사용을 위한 선언은 어떤 것이 있나요? 갈라파고스인 1222 2011/10/18
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.