var I, J: Integer; begin for I := 0 to StringGrid1.RowCount - 1 do begin Table1.Append; for J := 0 to StringGrid1.ColCount - 1 do Table1.Fields[J].AsString := StringGrid1.Cells[J, I]; end; Table1.Post; end;
var I, J: Integer; begin for I := 0 to StringGrid1.RowCount - 1 do begin Table1.Append; for J := 0 to StringGrid1.ColCount - 1 do Table1.Fields[J].AsString := StringGrid1.Cells[J, I]; Table1.Post;//这里 end; end;
I, J: Integer;
begin
for I := 0 to StringGrid1.RowCount - 1 do begin
Table1.Append;
for J := 0 to StringGrid1.ColCount - 1 do
Table1.Fields[J].AsString := StringGrid1.Cells[J, I];
end;
Table1.Post;
end;
I, J: Integer;
begin
for I := 0 to StringGrid1.RowCount - 1 do
begin
Table1.Append;
for J := 0 to StringGrid1.ColCount - 1 do
Table1.Fields[J].AsString := StringGrid1.Cells[J, I];
Table1.Post;//这里
end;
end;
要有Float类型的,这个到时候是要计算的,
不知道Table1.Fields[J].AsString := StringGrid1.Cells[J, I];
这样到时候不知道统计报表的时候计算可不可以(我现在还和很菜的)
把问题说得具体一点,最好有个一可以用来调试的表和代码~~to xiaoxiao197821:
Table1.Append;
Table1.Append;
Table1.Append;
Table1.Post;
连续Append会出错吗?~~
既然不会出错,那在每次循环都执行不是多余?~~
仔细是没错的,但请调试过在说话,一切以实为证~~