damage to the original color
Posted: Sat Jun 29, 2019 6:21 pm
before (original file)
after
my code (I read from the first sheet and write on the second)
read
write
why is this happening?
after
my code (I read from the first sheet and write on the second)
read
Code: Select all
xls.Filename:=edit1.Text;
xls.Password:=Edit2.Text;
xls.Read;
for i := xls[0].FirstRow to xls[0].LastRow do begin
if xls[0].AsString[0,i]= '' then break;
OneLine := TXlsLine.Create(xls[0].AsString[0,i],
DecodaDateWithZero(xls[0].AsDateTime[1,i]),
DecodaDateWithZeroDay(xls[0].AsDateTime[1,i]),
xls[0].AsString[2,i],
xls[0].AsString[3,i],
xls[0].AsString[4,i],
xls[0].AsFloat[5,i] );
xlsFile.Add(OneLine);
end;
Code: Select all
xls.Insert(1);
nlist:=1;
xls[nlist].Name:='Результаты';
XLS.DefaultFormat := Nil;
XLS[nlist].Comments.Add(col, row,'', TXlsLine(xlsFile[i]).Дата+' '+TXlsLine(xlsFile[i]).Поставщик+':'+TXlsLine(xlsFile[i]).Примечание+#13#10 );
xls[nlist].AsFloat[col, row]:= TXlsLine(xlsFile[i]).Сумма;
xls.SaveToFile(Edit1.Text);