|
for(int Col = 0; Col < 10; Col++)
{
for(int Row = 0; Row < 10; Row++)
{
ExcelData = StringGrid1->Cells[Col][Row];
cells = excel_sheet.OlePropertyGet("Cells",Row+1 , Col+1); //Cell선택
cells.OlePropertySet("Value", WideString(ExcelData));
}
}
이렇게 해도 안되는지요?
저도 지금 해보지는 못하지만 Col, Row 숫자를 잘 맞추면 되더라구요
저도 비슷한걸로 고생한 기억이 있어서 .. ;)
로즈마일런 님이 쓰신 글 :
: 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);
: 어렵네요 ㅠㅠ 고수님들 좀 알려주세요 부탁 드립니다
|