|
for(int Col = 1; Col < 11; Col++)
{
for(int Row = 1; Row < 11; Row++)
{
ExcelData = StringGrid1->Cells[Col][Row];
cells = excel_sheet.OlePropertyGet("Cells",Row , Col); //Cell선택
cells.OlePropertySet("Value", WideString(ExcelData));
}
}
이곳 포럼에서 얻은 소스인데 엑셀로 저장까지 됩니다 그런데 OlePropertyGet <<-이부분에서
그리드에 Cells[0][0] 부터 되는 것이 아니라 Cells[1][1] 부터 저장이 됩니다.
제가 빌더 이제 사용한지 한달도 안되어서 이해 못하고 소스만 보고 따라해 보고 있는데
도저히 답이 안나오네요 ㅠㅠ
OlePropertyGet 헬프에 나오는 내용인데요 아래 내용때문에 0.0이 저장 안되는것 같습니다 ㅠㅠ;
void OlePropertySet(const String& name, TAutoArgsBase& args);
template <class P1> void OlePropertySet(const String& name, P1 p1);
template <class P1, class P2> void OlePropertySet(const String& name, P1 p1, P2 p2);
template <class P1, class P2, class P3> void OlePropertySet(const String& name, P1 p1, P2 p2, P3 p3);
어렵네요 ㅠㅠ 고수님들 좀 알려주세요 부탁 드립니다
|