|
조금 막연하게 제가 질문을 한것같네요^^
그래서 지금까지 짠 소스를 올리겠습니다. 여기에서
엑셀의 간격을 조절시키는 방법만 갈켜주세요~
부탁드립니다.
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());
}
여기에서 엑셀의 세로 셀의 간격을 조절하고 싶거든요. 좀 도와주세요~
|