Einzelnen Beitrag anzeigen

t0mmy

Registriert seit: 28. Jul 2010
431 Beiträge
 
Delphi 2010 Architect
 
#3

AW: Ungültige Variantenoperation

  Alt 28. Jun 2012, 11:20
Hier der Code:

Delphi-Quellcode:

try
    while aSheet.Cells[8+i, 1].Value > 0 do
    begin
    
      aSheet2.Cells[21+(2*i), 4].Value := aSheet.Cells[8+i, 2].Value;
      aSheet2.Cells[21+(2*i)+1, 4].Value := aSheet.Cells[8+i, 2].Value;


      aSheet2.Cells[21+(2*i), 5].Value := 'AAAA';
      aSheet2.Cells[21+(2*i)+1, 5].Value := 'RW';

      if aSheet.Cells[8+i, 9].Value = 'weissthen
        aMaterial := '1'
      else if aSheet.Cells[8+i, 9].Value = 'blauthen
        aMaterial := '2'
      else
        aMaterial := 'n. b.';
      aSheet2.Cells[21+(2*i), 6].Value := aMaterial;
      aSheet2.Cells[21+(2*i)+1, 6].Value := aMaterial;

      aSheet2.Cells[21+(2*i), 7].Value := 16;
      aSheet2.Cells[21+(2*i)+1, 7].Value := 16;

      aSheet2.Cells[21+(2*i), 8].Value := aSheet.Cells[8+i, 5].Value;
      aSheet2.Cells[21+(2*i)+1, 8].Value := aSheet.Cells[8+i, 7].Value;

      aSheet2.Cells[21+(2*i), 9].Value := aSheet.Cells[8+i, 6].Value;
      aSheet2.Cells[21+(2*i)+1, 9].Value := aSheet.Cells[8+i, 8].Value;

      aSheet2.Cells[21+(2*i), 10].Value := aSheet.Cells[2, 4].Value;
      aSheet2.Cells[21+(2*i)+1, 10].Value := aSheet.Cells[2, 4].Value;

      inc(i);
    end;
  except on E:Exception do
    //ShowMessage('Fehler: '+E.Message);
  end;
  Mit Zitat antworten Zitat