[SOLVED] New FpSpreadsheet exception in Lazarus 1.6 lazarus / 49-FPSpreadsheet ---------------------------------------------------------------------- JD · 2016-02-29 14:51 Hi there everyone, I just upgraded to Lazarus 1.6/FPC 3.0 & in the process of migrating one of my key projects, I realised that FpSpreadsheet no longer works. I use FpspreadSheet 1.7 The exception occurs on the line below: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i MyWorkbook.WriteToFile(UTF8Decode(FileSaveAs1.Dialog.FileName), fmt, True);  The exception is Tried to write a spreadsheet using an unsupported format fmt is a type of TsSpreadSheetFormat. I got a warning earlier saying I should change to TsSpreadFormatID but when I did this I could not compile the project because of the lines below: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i           case FileSaveAs1.Dialog.FilterIndex of            1: fmt := sfOOXML;                 // Indexes are 1-based here!            2: fmt := sfExcel8;            3: fmt := sfOpenDocument;            5: fmt := sfCSV;          end;  What should I do to get it working again like before with Lazarus 1.4.4? Thanks, JD ---------------------------------------------------------------------- wp · 2016-02-29 14:57 The message text indicates that you do not "use" the reader/writer unit of the file format requested. Add the corresponding unit to "uses", or use "fpsallformats". In fps trunk a new file format was added (Excel XML), plus the possibility to register your own formats. Maybe this screwed up your list of SaveDialog filters. The TsSpreadFormatID was introduced to enable user-define formats. As long as you stay with the built-in formats you can use the old old syntax with sfXXXX identifiers. ---------------------------------------------------------------------- JD · 2016-02-29 16:27 Quote from: wp on February 29, 2016, 03:57:58 pmThe message text indicates that you do not "use" the reader/writer unit of the file format requested. Add the corresponding unit to "uses", or use "fpsallformats". In fps trunk a new file format was added (Excel XML), plus the possibility to register your own formats. Maybe this screwed up your list of SaveDialog filters. The TsSpreadFormatID was introduced to enable user-define formats. As long as you stay with the built-in formats you can use the old old syntax with sfXXXX identifiers. It worked after I added fpsallformats to the uses clause. Thanks a lot for your quick response. JD