Lazarus

Programming => Packages and Libraries => Lazarus Extra Components => Topic started by: six1 on February 27, 2019, 11:34:57 am

Title: Error writing fpSpreadsheet [Problem solved]
Post by: six1 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?
Title: Re: Error writing fpSpreadsheet
Post by: wp 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.
Title: Re: Error writing fpSpreadsheet
Post by: six1 on February 27, 2019, 12:34:17 pm
...real magic. It works!

Thank you so much!

best, michael