damage to the original color

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
qwertehok
Posts: 13
Joined: Tue Jan 28, 2014 12:45 pm

damage to the original color

Post by qwertehok »

before (original file)
Image

after
Image


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;
write

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);
why is this happening?
Post Reply