unit Main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, XLSReadWriteII5, Grids, IniFiles, Xc12Utils5,
XLSSheetData5, XPMan;
type TDoubleArray = array of double;
type
TfrmMain = class(TForm)
Panel1: TPanel;
btnRead: TButton;
btnWrite: TButton;
edReadFilename: TEdit;
edWriteFilename: TEdit;
btnDlgOpen: TButton;
btnDlgSave: TButton;
dlgSave: TSaveDialog;
dlgOpen: TOpenDialog;
Button1: TButton;
Grid: TStringGrid;
btnAddCells: TButton;
XLS: TXLSReadWriteII5;
XPManifest1: TXPManifest;
procedure btnCloseClick(Sender: TObject);
procedure btnReadClick(Sender: TObject);
procedure btnWriteClick(Sender: TObject);
procedure btnDlgOpenClick(Sender: TObject);
procedure btnDlgSaveClick(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure btnAddCellsClick(Sender: TObject);
private
procedure AddCells;
procedure ReadCells;
public
{ Public declarations }
end;
var
frmMain: TfrmMain;
implementation
{$R *.dfm}
procedure TfrmMain.btnCloseClick(Sender: TObject);
begin
Close;
end;
procedure TfrmMain.btnReadClick(Sender: TObject);
begin
XLS.Filename := edReadFilename.Text;
XLS.Read;
ReadCells;
end;
procedure TfrmMain.btnWriteClick(Sender: TObject);
begin
XLS.Filename := edWriteFilename.Text;
XLS.Write;
end;
procedure TfrmMain.btnDlgOpenClick(Sender: TObject);
begin
dlgOpen.FileName := edReadFilename.Text;
if dlgOpen.Execute then
edReadFilename.Text := dlgOpen.FileName;
end;
procedure TfrmMain.btnDlgSaveClick(Sender: TObject);
begin
dlgSave.FileN