ABC
2005-01-19, 18:09:29
Hi,
ist es schneller z.B bei einem Excel Dokument mit einer For Schleife Items
einzulesen wie in dem Beispiel
for(int i=0;i<1000000;i++)
{
Variant data = MyWS.OlePropertyGet("Cells").OlePropertyGet("Item",i,1).OlePropertyGet("Value");
test=data;
if(test=="")
{
ShowMessage("Import erfolgreich");
V.OlePropertySet("Visible", false);
break;
}
this->verband->set_Vorname(data);
data = MyWS.OlePropertyGet("Cells").OlePropertyGet("Item",i,2).OlePropertyGet("Value");
this->verband->set_Nachname(data);
data = MyWS.OlePropertyGet("Cells").OlePropertyGet("Item",i,3).OlePropertyGet("Value");
this->verband->set_Birthday(data);
data = MyWS.OlePropertyGet("Cells").OlePropertyGet("Item",i,4).OlePropertyGet("Value");
this->verband->set_Gewicht(data);
data = MyWS.OlePropertyGet("Cells").OlePropertyGet("Item",i,5).OlePropertyGet("Value");
this->verband->set_geschl(data);
data = MyWS.OlePropertyGet("Cells").OlePropertyGet("Item",i,6).OlePropertyGet("Value");
this->verband->set_Nationaliaet(data);
this->verband->set_gewichts_klasse();
this->verband->set_currentPos(this->verband->get_current_Pos()+1);
oder soll ich lieber für jedes Item eine For Schleife laufen lassen?
ist es schneller z.B bei einem Excel Dokument mit einer For Schleife Items
einzulesen wie in dem Beispiel
for(int i=0;i<1000000;i++)
{
Variant data = MyWS.OlePropertyGet("Cells").OlePropertyGet("Item",i,1).OlePropertyGet("Value");
test=data;
if(test=="")
{
ShowMessage("Import erfolgreich");
V.OlePropertySet("Visible", false);
break;
}
this->verband->set_Vorname(data);
data = MyWS.OlePropertyGet("Cells").OlePropertyGet("Item",i,2).OlePropertyGet("Value");
this->verband->set_Nachname(data);
data = MyWS.OlePropertyGet("Cells").OlePropertyGet("Item",i,3).OlePropertyGet("Value");
this->verband->set_Birthday(data);
data = MyWS.OlePropertyGet("Cells").OlePropertyGet("Item",i,4).OlePropertyGet("Value");
this->verband->set_Gewicht(data);
data = MyWS.OlePropertyGet("Cells").OlePropertyGet("Item",i,5).OlePropertyGet("Value");
this->verband->set_geschl(data);
data = MyWS.OlePropertyGet("Cells").OlePropertyGet("Item",i,6).OlePropertyGet("Value");
this->verband->set_Nationaliaet(data);
this->verband->set_gewichts_klasse();
this->verband->set_currentPos(this->verband->get_current_Pos()+1);
oder soll ich lieber für jedes Item eine For Schleife laufen lassen?