Recent

Author Topic: FPSpreadsheet - data loss  (Read 9554 times)

wht244

  • Jr. Member
  • **
  • Posts: 79
FPSpreadsheet - data loss
« on: September 14, 2010, 09:21:17 am »
I have a Excel file. I try to read some data from it, but some cells are empty when loading (in file there are filled with data).
A simple code shows that the file is not properly read:
Code: [Select]
  wb := TsWorkbook.Create;
  wb.ReadFromFile(openme.FileName, sfExcel8);
  wb.WriteToFile(openme.FileName + '.back.xls', sfExcel8, true);
  wb.Free;
After saving a file, cells, which should be filled and were not filled on read are empty when opening file in Excel. Is there any option to resolve this??

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: FPSpreadsheet - data loss
« Reply #1 on: September 14, 2010, 10:21:14 am »
ReadFromFile converts the document from excel 8 into the fpspreadsheet intermediary format. If a cell has an unsupported type, then it will be ignored.

What are the types of the affected functions?

And in general this kind of issue should be reported in the bug tracker with a test application which reproduces the issue.

wht244

  • Jr. Member
  • **
  • Posts: 79
Re: FPSpreadsheet - data loss
« Reply #2 on: September 14, 2010, 03:28:07 pm »
What are the types of the affected functions?
the file has no functions in worksheet. only "raw" data like strings, floats, integers.

And in general this kind of issue should be reported in the bug tracker with a test application which reproduces the issue.
i cannot report the issue, because i don't know how to reproduce this issue with other files. i cannot publish that file's content.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: FPSpreadsheet - data loss
« Reply #3 on: September 14, 2010, 03:51:30 pm »
I ment: Of which types of data are the affected cells?

It should be possible to create a new file which reproduces the issue.

If not, then you can always debug fpspreadsheet yourself. It shouldn't be hard, just put some breakpoints in the excel 8 reader and see where it receives the affected cells and why it can't process them. Everything is documented, including the excel 8 format.

wht244

  • Jr. Member
  • **
  • Posts: 79
Re: FPSpreadsheet - data loss
« Reply #4 on: September 14, 2010, 04:15:57 pm »
I ment: Of which types of data are the affected cells?
the types are as i described before (text - strings, number formats like floats, integers).

i'll try once again to reproduce the issue...

 

TinyPortal © 2005-2018