[Solved] Problem with WriteNumber lazarus / 49-FPSpreadsheet ---------------------------------------------------------------------- albalx · 2016-06-11 19:34 Hi, I'm trying to put in a cell a numeric value, but I get the following error: unit1.pas(39,19) Error: identifier idents no member "WriteNumber" I get this error in Lazarus 1.6/FPC , the code is: 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 unit Unit1; {$mode objfpc}{$H+} interface uses  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,  fpstypes, fpspreadsheet, fpsallformats, laz_fpspreadsheet, fpspreadsheetctrls,  fpspreadsheetgrid; type   { TForm1 }   TForm1 = class(TForm)    Button1: TButton;    sWorkbookSource1: TsWorkbookSource;    sWorkbookTabControl1: TsWorkbookTabControl;    sWorksheetGrid1: TsWorksheetGrid;    procedure Button1Click(Sender: TObject);  private    { private declarations }  public    { public declarations }  end; var  Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.Button1Click(Sender: TObject);begin  sWorksheetGrid1.WriteNumber(1, 1, 1.0);end; end.                            Can anyone tell me what I'm doing wrong? Saludos. ---------------------------------------------------------------------- wp · 2016-06-11 19:53 The grid is just a visual representation of the worksheet. WriteNumber is a method of the worksheet. Call WorksheetGrid.Worksheet.WriteNumber(...). Or use the grid property Cells[] which passes the data on to the worksheet. Note that for historical reasons row and column indexes are different for grid and worksheet: The left-top cell of the worksheet ("A1") has the indexes row=0 and column=0 while in the grid it is row=1 and col=1 because the fixed row and column counts as well. And the order of row and column indexes is different as well. 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   row := 1;  // Cell B1  col := 2;  WorksheetGrid.Cells[col, row] := 1.234;  // or:  WorksheetGrid.Worksheet.WriteNumber(row-1, col-1, 1.234);  // Note different order of row and col indexes /code] ---------------------------------------------------------------------- albalx · 2016-06-11 21:18 Perfect, thanks Saludos.