WriteText FPSpreadsheet lazarus / 49-FPSpreadsheet ---------------------------------------------------------------------- mcinquino · 2017-02-07 13:47 Hello, I am new to Lazarus and I am attempting to write an application that uses FPSpreadsheet. I have a form with a TsWorkbookSource, TsWorkbookTabControl and TsWorksheetGrid place on it as shown in the "Writing a mini spreadsheet application" example. The TsWorkbookTabControl and TsWorksheetGrid are linked to the TsWorkbookSource. I am attempting to use WriteText to populate a cell on the sheet displayed on the form. I am getting an error when it attempts to compile. Error: identifier idents no member "WriteText" I am using the default names of the components on the form.  Below is the line I am attempting to use to place the string in the cell. sWorksheetGrid1.WriteText(0,0,'test'); I am not finding any specific examples to work from. The examples I do see do not appear to be created from the IDE as shown in the "Writing a mini spreadsheet application" example.  When the above line is remove the program compiles and the sheet works as expected. The TsCellEdit control works as expected. I am using Lazarus Version 1.6 and laz_fpsreadsheet 1.7 and laz_fpsreadsheet_visual 1.7. Any help would be greatly appreciated. ---------------------------------------------------------------------- wp · 2017-02-07 14:04 WriteText() is a method of the Worksheet which stores all the data for the grid. So, you must call 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   sWorksheetGrid1.Worksheet.WriteText(0, 0, 'Test');  sWorksheetGrid1.Worksheet.WriteNumber(0, 1, 2.45); But there is also a more direct, stringgrid-like acess: 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   sWorksheetGrid1.Cells[1, 1] := 'Test';  sWorksheetGrid1.Cells[2, 1] := 2.45;Cells[] accepts variants, i.e. you can use strings, numbers, or date/times in the same way. But note that the worksheet's WriteText() and the grid's Cells[] treat cell indexes in a different way: - WriteText(row, colum, ...), row and column begin at 0 - Grid.Cells[column, row], row and columns begin at 0, too, but numbering includes the header rows/columns, i.e. effectively they begin at 1 in most cases. (Both example codes above produce the same result). Documentation of the Worksheet: http://wiki.lazarus.freepascal.org/FPSpreadsheet Documentation of the WorksheetGrid (in addition to the tutorial): http://wiki.lazarus.freepascal.org/TsWorksheetGrid ---------------------------------------------------------------------- mcinquino · 2017-02-07 14:13 Thank you so much! The Cells method works perfectly. I thought I had tried that in the past but it might have been an issue with the row, col that prevented it.