Recent

Author Topic: Error writing fpSpreadsheet [Problem solved]  (Read 695 times)

six1

  • Jr. Member
  • **
  • Posts: 73
Error writing fpSpreadsheet [Problem solved]
« on: February 27, 2019, 11:34:57 am »
Hi,
my Project compiles well on Laz 1.8.2 Win32 and all is in function.
Updated to Laz 2.0 fpc 3.0.4 Win32, i can no longer save  Worksheet.workbook
fpSpreadsheet is latest from OPM!

Worksheet.workbook.WriteToFile([valid! Filename], true) throws an error:

Error Message see attached Picture


what's to do, anyone an idea?
« Last Edit: February 27, 2019, 02:07:50 pm by six1 »

wp

  • Hero Member
  • *****
  • Posts: 5835
Re: Error writing fpSpreadsheet
« Reply #1 on: February 27, 2019, 12:21:28 pm »
The "unsupported reader/writer" errors occur when the program does not find the unit with the reader/writer code for the specific file format. FPSpreadsheet is designed such that every file format is supported in its own reader/writer unit, and this unit must be added to the "uses" clause of the program, the most important ones being: unit xlsxOOXML for Excel 2007+, xlsBiff8 for Excel97, fpsOpenDocument for Libre/OpenOffice. Or, add fpsAllFormats to link readers/writers of all file formats implemented. See "Note" at the end of the chapter http://wiki.lazarus.freepascal.org/FPSpreadsheet#Workbook.

The reason why this happens now is probably not related with the Lazarus version, but with the version of fpspreadsheet because the unit fpsAllFormats has been removed some time ago from the visual controls package to avoid linking all readers/writers automatically.
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

six1

  • Jr. Member
  • **
  • Posts: 73
Re: Error writing fpSpreadsheet
« Reply #2 on: February 27, 2019, 12:34:17 pm »
...real magic. It works!

Thank you so much!

best, michael
« Last Edit: February 27, 2019, 02:07:43 pm by six1 »