I'm using existing excel file (excel8) and filling it with freshly collected data from my aplication.
EkselFile:=TsWorkbook.Create;
EkselFile.ReadFromFile('my_excell_file.xls');
MyWorksheet := EkselFajl.GetWorksheetByIndex(0); // use the first worksheet
The existing file is using formulas to calculate procents and totals, it's formated, colored, bordered, bolded, underlined... so I'm using it and just put newly calculated data into it and then I save it:
EkselFile.WriteToFile('the_new_file.xls', sfExcel8, true);
ekselFile.Free;
When I open the file i can see Data that i put on is correct while previous formating is lost, only the text of the headlines of columns and rows are kept but
- no more color,
- no bold fonts,
- fonts size set to default size,
- fonts all set to default font, and
- no more formula.
What am i missing ?