main.pas
来自「aoto excel and delphi」· PAS 代码 · 共 43 行
PAS
43 行
unit Main;
interface
uses
Windows, Messages, SysUtils,
Classes, Graphics, Controls,
Forms, Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
public
V: Variant;
end;
var
Form1: TForm1;
implementation
uses
ComObj;
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
V := CreateOleObject('Excel.Application');
V.Visible := True;
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
if not VarIsEmpty(V) then
V.Quit;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?