You've already forked lazarus-ccr
50 lines
819 B
ObjectPascal
50 lines
819 B
ObjectPascal
![]() |
unit mainform;
|
||
|
|
||
|
{$mode objfpc}{$H+}
|
||
|
|
||
|
interface
|
||
|
|
||
|
uses
|
||
|
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
||
|
StdCtrls, fpspreadsheetgrid, fpspreadsheet;
|
||
|
|
||
|
type
|
||
|
|
||
|
{ TForm1 }
|
||
|
|
||
|
TForm1 = class(TForm)
|
||
|
buttonPopulateGrid: TButton;
|
||
|
sWorksheetGrid1: TsWorksheetGrid;
|
||
|
procedure buttonPopulateGridClick(Sender: TObject);
|
||
|
private
|
||
|
{ private declarations }
|
||
|
public
|
||
|
{ public declarations }
|
||
|
end;
|
||
|
|
||
|
var
|
||
|
Form1: TForm1;
|
||
|
|
||
|
implementation
|
||
|
|
||
|
{ TForm1 }
|
||
|
|
||
|
procedure TForm1.buttonPopulateGridClick(Sender: TObject);
|
||
|
var
|
||
|
lWorksheet: TsWorksheet;
|
||
|
begin
|
||
|
lWorksheet := TsWorksheet.Create;
|
||
|
try
|
||
|
lWorksheet.GetCell(2, 2)^.UTF8StringValue := 'Algo';
|
||
|
sWorksheetGrid1.LoadFromWorksheet(lWorksheet);
|
||
|
finally
|
||
|
lWorksheet.Free;
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
initialization
|
||
|
{$I mainform.lrs}
|
||
|
|
||
|
end.
|
||
|
|