Code: Select all
try
{
int Lines = 25;
XLSReadWriteII51->Version = xvExcel97;
TDateTime dt(TDateTime::CurrentDate());
for(int i=0; i<Lines; i++)
XLSReadWriteII51->Sheets[0]->AsDateTime[0][i] = dt + double(i+1)/96.;
XLSReadWriteII51->Filename = L"test01.xls";
XLSReadWriteII51->Write();
}
catch(Exception& e)
{
Application->ShowException(&e);
}
'Error on writing record #22
Access violation at address....
I lines is up to 24, there is no problem. If format is Excel2007 there is no problem too.
Markus