customfunctionfrm.pas
来自「DevExpress公司出品的Borland Delphi和C++ Builde」· PAS 代码 · 共 45 行
PAS
45 行
unit CustomFunctionFrm;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
cxControls, cxSSheet;
type
TCustomFunctionForm = class(TForm)
cxSpreadSheet: TcxSpreadSheet;
procedure FormCreate(Sender: TObject);
private
public
{ Public declarations }
end;
var
CustomFunctionForm: TCustomFunctionForm;
implementation
{$R *.DFM}
procedure TCustomFunctionForm.FormCreate(Sender: TObject);
var
CellObject: TcxSSCellObject;
begin
try
cxSpreadSheet.LoadFromFile(ExtractFilePath(Application.ExeName) + '\CustomFunctionEx.xls');
CellObject := cxSpreadSheet.Sheet.GetCellObject(1,4);
try
CellObject.Text := '=Area(B3:B4)';
finally
CellObject.Free;
end;
except
on E: Exception do
Application.ShowException(E);
end;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?