2009-10-06 19:25:18 +00:00
|
|
|
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
|
2010-05-02 10:30:45 +00:00
|
|
|
lWorksheet.WriteUTF8Text(2, 2, 'Algo');
|
2009-10-06 19:25:18 +00:00
|
|
|
sWorksheetGrid1.LoadFromWorksheet(lWorksheet);
|
|
|
|
finally
|
|
|
|
lWorksheet.Free;
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
|
|
|
initialization
|
|
|
|
{$I mainform.lrs}
|
|
|
|
|
|
|
|
end.
|
|
|
|
|