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 = '
weiss'
then
aMaterial := '
1'
else if aSheet.Cells[8+i, 9].Value = '
blau'
then
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;