unit F1edit;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
AxCtrls, OleCtrls, TTF160_TLB, Menus, ComCtrls, ToolWin, ImgList,
ActnList, StdActns, StdCtrls;
type
Tfrmf1main = class(TForm)
CoolBar1: TCoolBar;
ToolBar1: TToolBar;
ToolBar2: TToolBar;
StatusBar1: TStatusBar;
ToolBar3: TToolBar;
ToolButton1: TToolButton;
ToolButton2: TToolButton;
ToolButton3: TToolButton;
ToolButton4: TToolButton;
ToolButton5: TToolButton;
ToolButton8: TToolButton;
ToolButton9: TToolButton;
ToolButton10: TToolButton;
ToolButton11: TToolButton;
ToolButton12: TToolButton;
ToolButton13: TToolButton;
ToolButton14: TToolButton;
ToolButton15: TToolButton;
ToolButton16: TToolButton;
ToolButton17: TToolButton;
ToolButton18: TToolButton;
ToolButton19: TToolButton;
ToolButton20: TToolButton;
ToolButton21: TToolButton;
ToolButton22: TToolButton;
ToolButton23: TToolButton;
ToolButton24: TToolButton;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
N6: TMenuItem;
N7: TMenuItem;
N8: TMenuItem;
N9: TMenuItem;
N10: TMenuItem;
Mf1Book1: TMf1Book;
N11: TMenuItem;
N13: TMenuItem;
N14: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
N17: TMenuItem;
N18: TMenuItem;
N19: TMenuItem;
N20: TMenuItem;
N21: TMenuItem;
N22: TMenuItem;
N23: TMenuItem;
N24: TMenuItem;
N25: TMenuItem;
N26: TMenuItem;
N27: TMenuItem;
N28: TMenuItem;
N29: TMenuItem;
N30: TMenuItem;
N31: TMenuItem;
N32: TMenuItem;
N33: TMenuItem;
N34: TMenuItem;
N35: TMenuItem;
N36: TMenuItem;
N37: TMenuItem;
N38: TMenuItem;
N40: TMenuItem;
N41: TMenuItem;
N42: TMenuItem;
N43: TMenuItem;
N44: TMenuItem;
N45: TMenuItem;
N46: TMenuItem;
N47: TMenuItem;
N48: TMenuItem;
N49: TMenuItem;
N50: TMenuItem;
N51: TMenuItem;
N52: TMenuItem;
N53: TMenuItem;
N54: TMenuItem;
N55: TMenuItem;
N56: TMenuItem;
N57: TMenuItem;
N58: TMenuItem;
N59: TMenuItem;
N60: TMenuItem;
N61: TMenuItem;
N62: TMenuItem;
N63: TMenuItem;
N64: TMenuItem;
N65: TMenuItem;
ToolButton6: TToolButton;
OpenDialog1: TOpenDialog;
SaveDialog1: TSaveDialog;
ImageList1: TImageList;
ToolButton7: TToolButton;
ToolButton25: TToolButton;
ToolButton26: TToolButton;
ToolButton27: TToolButton;
ToolButton28: TToolButton;
ToolButton29: TToolButton;
ActionList1: TActionList;
widthauto: TAction;
EditCopy1: TEditCopy;
EditCut1: TEditCut;
EditDelete1: TEditDelete;
EditPaste1: TEditPaste;
sort: TAction;
openfile: TAction;
saveas: TAction;
mergesell: TAction;
border1: TAction;
border2: TAction;
aligncenter: TAction;
alignleft: TAction;
alingright: TAction;
find: TAction;
findreplace: TAction;
gotocell: TAction;
setfont: TAction;
preview: TAction;
print: TAction;
N66: TMenuItem;
N67: TMenuItem;
N68: TMenuItem;
N69: TMenuItem;
N70: TMenuItem;
N71: TMenuItem;
ToolButton32: TToolButton;
ToolButton33: TToolButton;
PopupMenu2: TPopupMenu;
N72: TMenuItem;
Label1: TLabel;
Label2: TLabel;
N12: TMenuItem;
N39: TMenuItem;
N73: TMenuItem;
ToolButton39: TToolButton;
PopupMenu3: TPopupMenu;
N74: TMenuItem;
N75: TMenuItem;
N76: TMenuItem;
N77: TMenuItem;
N78: TMenuItem;
N79: TMenuItem;
N80: TMenuItem;
procedure N56Click(Sender: TObject);
procedure N60Click(Sender: TObject);
procedure widthautoExecute(Sender: TObject);
procedure sortExecute(Sender: TObject);
procedure openfileExecute(Sender: TObject);
procedure saveasExecute(Sender: TObject);
procedure mergesellExecute(Sender: TObject);
procedure border1Execute(Sender: TObject);
procedure border2Execute(Sender: TObject);
procedure aligncenterExecute(Sender: TObject);
procedure alignleftExecute(Sender: TObject);
procedure alingrightExecute(Sender: TObject);
procedure findExecute(Sender: TObject);
procedure findreplaceExecute(Sender: TObject);
procedure gotocellExecute(Sender: TObject);
procedure setfontExecute(Sender: TObject);
procedure N57Click(Sender: TObject);
procedure N58Click(Sender: TObject);
procedure N61Click(Sender: TObject);
procedure ToolButton14Click(Sender: TObject);
procedure ToolButton15Click(Sender: TObject);
procedure ToolButton29Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Mf1Book1SelChange(Sender: TObject);
procedure previewExecute(Sender: TObject);
procedure printExecute(Sender: TObject);
procedure N7Click(Sender: TObject);
procedure N67Click(Sender: TObject);
procedure N68Click(Sender: TObject);
procedure N69Click(Sender: TObject);
procedure N70Click(Sender: TObject);
procedure N71Click(Sender: TObject);
procedure insertdata(sender: Tobject);
procedure FormClose(Sender: TObject
var Action: TCloseAction);
procedure N4Click(Sender: TObject);
procedure N40Click(Sender: TObject);
procedure N12Click(Sender: TObject);
procedure N73Click(Sender: TObject);
procedure N45Click(Sender: TObject);
procedure N46Click(Sender: TObject);
procedure N47Click(Sender: TObject);
procedure N48Click(Sender: TObject);
procedure N51Click(Sender: TObject);
procedure N52Click(Sender: TObject);
procedure N53Click(Sender: TObject);
procedure N31Click(Sender: TObject);
procedure N32Click(Sender: TObject);
procedure N33Click(Sender: TObject);
procedure N34Click(Sender: TObject);
procedure ToolButton36Click(Sender: TObject);
procedure ToolButton35Click(Sender: TObject);
procedure ToolButton37Click(Sender: TObject);
procedure ToolButton38Click(Sender: TObject);
procedure ToolButton34Click(Sender: TObject);
procedure N74Click(Sender: TObject);
procedure N80Click(Sender: TObject);
procedure N79Click(Sender: TObject);
procedure N78Click(Sender: TObject);
procedure N77Click(Sender: TObject);
procedure N76Click(Sender: TObject);
private
fu,fb,fi,fl,fc,fr:boolean;
procedure showhint(Sender:TObject);
{ Private declarations }
public
{ Public declarations }
end;
var
frmf1main: Tfrmf1main;
modified:boolean;
implementation
uses CxyCommon;
{$R *.DFM}
procedure Tfrmf1main.insertdata(sender: Tobject);
var Mitem:Tmenuitem;i,j:integer;ss:string;
begin
if sender is Tmenuitem then
begin
Mitem:=sender as Tmenuitem;
Mf1book1.GetActiveCell(i,j);
ss:=copy(mitem.caption,1,pos('(',mitem.caption)-1);
Mf1book1.EntryRC[i,j]:='#'+ss+'#';
end;
end;
procedure Tfrmf1main.showhint(Sender:TObject);
begin
// statusbar1.Panels[0].text:=application.Hint;
end;
procedure Tfrmf1main.N56Click(Sender: TObject);
begin
mf1book1.FormatCellsDlg(1);
end;
procedure Tfrmf1main.N60Click(Sender: TObject);
begin
if not N60.Checked then
begin
Mf1book1.ProtectionDlg;
N60.checked:=true;
end
else
begin
Mf1book1.SetProtection(false,false);
N60.checked:=false;
end;
end;
procedure Tfrmf1main.widthautoExecute(Sender: TObject);
begin
Mf1book1.SetColWidthAuto(1,1,100,100,false);
end;
procedure Tfrmf1main.sortExecute(Sender: TObject);
begin
Mf1book1.SortDlg;
end;
procedure Tfrmf1main.openfileExecute(Sender: TObject);
begin
if opendialog1.Execute then
Mf1book1.ReadEx(opendialog1.filename);
mf1book1.ShowTabs:=1;
// mf1book1.SheetSelected[2]:=true;
// Mf1book1.maxrow:=20;
// Mf1book1.maxcol:=10;
end;
procedure Tfrmf1main.saveasExecute(Sender: TObject);
var filepath:string;
begin
if savedialog1.Execute then
mf1book1.Write(savedialog1.FileName,$0000000B);
end;
procedure Tfrmf1main.mergesellExecute(Sender: TObject);
var cheng:If1cellformat;
begin
cheng:=mf1book1.GetCellFormat;
cheng.Set_MergeCells(true);
Mf1book1.SetCellFormat(cheng);
end;
procedure Tfrmf1main.border1Execute(Sender: TObject);
var cheng:If1cellformat;
begin
cheng:=mf1book1.GetCellFormat;
cheng.Set_BorderStyle($00000000,$00000002);
cheng.set_borderstyle($00000001,$00000002);
cheng.set_borderstyle($00000002,$00000002);
cheng.set_borderstyle($00000003,$00000002);
Mf1book1.SetCellFormat(cheng);
end;
procedure Tfrmf1main.border2Execute(Sender: TObject);
var cheng:If1cellformat;
begin
cheng:=mf1book1.GetCellFormat;
cheng.Set_BorderStyle($FFFFFFFF,$00000001);
cheng.set_borderstyle($FFFFFFFE,$00000001);
Mf1book1.SetCellFormat(cheng);
end;
procedure Tfrmf1main.aligncenterExecute(Sender: TObject);
var cheng:If1cellformat;
begin
if not fc then
begin
toolbutton18.down:=true;
toolbutton16.down:=false;
toolbutton19.down:=false;
fl:=false;
fr:=false;
cheng:=mf1book1.GetCellFormat;
cheng.AlignHorizontal:=f1haligncenter;
cheng.alignvertical:=f1valigncenter;
Mf1book1.SetCellFormat(cheng);
fc:=true;
end
else
begin
toolbutton18.down:=false;
cheng:=mf1book1.GetCellFormat;
cheng.AlignHorizontal:=f1halignleft;
cheng.alignvertical:=f1valigncenter;
Mf1book1.SetCellFormat(cheng);
fc:=false
end;
end;
procedure Tfrmf1main.alignleftExecute(Sender: TObject);
var cheng:If1cellformat;
begin
if not fl then
begin
toolbutton16.Down:=true;
cheng:=mf1book1.GetCellFormat;
cheng.AlignHorizontal:=f1halignleft;
cheng.alignvertical:=f1valigncenter;
Mf1book1.SetCellFormat(cheng);
toolbutton18.down:=false;
toolbutton19.down:=false;
fc:=false;
fr:=false;
fl:=true;
end
else
begin
toolbutton16.Down:=false;
cheng:=mf1book1.GetCellFormat;
cheng.AlignHorizontal:=f1halignleft;
cheng.alignvertical:=f1valigncenter;
Mf1book1.SetCellFormat(cheng);
fl:=false;
end;
end;
procedure Tfrmf1main.alingrightExecute(Sender: TObject);
var cheng:If1cellformat;
begin
if not fr then
begin
toolbutton19.down:=true;
toolbutton16.down:=false;
toolbutton18.down:=false;
fl:=false;
fc:=false;
cheng:=mf1book1.GetCellFormat;
cheng.AlignHorizontal:=f1halignright;
cheng.alignvertical:=f1valigncenter;
Mf1book1.SetCellFormat(cheng);
fr:=true;
end
else
begin
toolbutton19.down:=false;
cheng:=mf1book1.GetCellFormat;
cheng.AlignHorizontal:=f1halignleft;
cheng.alignvertical:=f1valigncenter;
Mf1book1.SetCellFormat(cheng);
fr:=false;
end;
end;
procedure Tfrmf1main.findExecute(Sender: TObject);
begin
mf1book1.FindDlg;
end;
procedure Tfrmf1main.findreplaceExecute(Sender: TObject);
begin
mf1book1.ReplaceDlg;
end;
procedure Tfrmf1main.gotocellExecute(Sender: TObject);
begin
mf1book1.GotoDlg;
end;
procedure Tfrmf1main.setfontExecute(Sender: TObject);
begin
Mf1book1.FormatFontDlg;
end;
procedure Tfrmf1main.N57Click(Sender: TObject);
begin
mf1book1.RowHeightDlg;
end;
procedure Tfrmf1main.N58Click(Sender: TObject);
begin
mf1book1.ColWidthDlg;
end;
procedure Tfrmf1main.N61Click(Sender: TObject);
begin
//mf1book1.FormatSheetDlg(2,true)
end;
procedure Tfrmf1main.ToolButton14Click(Sender: TObject);
begin
if fu then
begin
mf1book1.FontUnderline:=false;
toolbutton14.Update;
toolbutton14.down:=false;
fu:=false;
end
else
begin
mf1book1.fontunderline:=true;
toolbutton14.down:=true;
fu:=true;
end;
end;
procedure Tfrmf1main.ToolButton15Click(Sender: TObject);
begin
if fb then
begin
mf1book1.Fontbold:=false;
toolbutton15.down:=false;
fb:=false;
end
else
begin
mf1book1.fontbold:=true;
toolbutton15.down:=true;
fb:=true;
end;
end;
procedure Tfrmf1main.ToolButton29Click(Sender: TObject);
begin
if fi then
begin
mf1book1.FontItalic:=false;
toolbutton29.down:=false;
fi:=false;
end
else
begin
mf1book1.FontItalic :=true;
toolbutton29.down:=true;
fi:=true;
end;
end;
procedure Tfrmf1main.FormCreate(Sender: TObject);
begin
modified:=false;
application.OnHint:=showhint;
fu:=false;
fb:=false;
fi:=false;
fl:=false;
fc:=false;
fr:=false;
end;
procedure Tfrmf1main.Mf1Book1SelChange(Sender: TObject);
var cheng:If1cellformat;
begin
fu:=mf1book1.FontUnderline;
toolbutton14.down:=mf1book1.FontUnderline;
fb:=mf1book1.FontBold;
toolbutton15.Down:=mf1book1.FontBold;
fi:=mf1book1.FontItalic;
toolbutton29.Down:=mf1book1.FontItalic;
cheng:=mf1book1.GetCellFormat;
case cheng.AlignHorizontal of
1: begin
toolbutton16.down:=false;
toolbutton18.down:=false;
toolbutton19.down:=false;
fc:=false;
fl:=false;
fr:=false;
end;
f1halignleft:begin
toolbutton16.down:=true;
toolbutton18.down:=false;
toolbutton19.down:=false;
fc:=false;
fr:=false;
fl:=true;
end;
f1haligncenter:begin
toolbutton18.down:=true;
toolbutton16.down:=false;
toolbutton19.down:=false;
fl:=false;
fr:=false;
fc:=true;
end;
f1halignright:begin
toolbutton19.down:=true;
toolbutton16.down:=false;
toolbutton18.down:=false;
fl:=false;
fc:=false;
fr:=true;
end;
end;//endcase
end;
procedure Tfrmf1main.previewExecute(Sender: TObject);
begin
mf1book1.FilePrintPreview;
end;
procedure Tfrmf1main.printExecute(Sender: TObject);
begin
mf1book1.FilePrint(false);
end;
procedure Tfrmf1main.N7Click(Sender: TObject);
begin
mf1book1.FilePageSetupDlg;
end;
procedure Tfrmf1main.N67Click(Sender: TObject);
var i,j:integer;
begin
mf1book1.GetActiveCell(i,j);
Mf1book1.EntryRC[i,j]:='编报单位:#';
end;
procedure Tfrmf1main.N68Click(Sender: TObject);
var i,j:integer;
begin
mf1book1.GetActiveCell(i,j);
Mf1book1.EntryRC[i,j]:='#年度';
end;
procedure Tfrmf1main.N69Click(Sender: TObject);
var i,j:integer;
begin
mf1book1.GetActiveCell(i,j);
Mf1book1.EntryRC[i,j]:='#季度';
end;
procedure Tfrmf1main.N70Click(Sender: TObject);
var i,j:integer;
begin
mf1book1.GetActiveCell(i,j);
Mf1book1.EntryRC[i,j]:='编号';
end;
procedure Tfrmf1main.N71Click(Sender: TObject);
var i,j:integer;
begin
mf1book1.GetActiveCell(i,j);
Mf1book1.EntryRC[i,j]:='单位:#';
end;
procedure insertdatafloat(sender:Tobject);
begin
end;
procedure Tfrmf1main.FormClose(Sender: TObject
var Action: TCloseAction);
var filepath:string
i:integer;
begin
if modified then
begin
i:=application.MessageBox('您没有保存修改过的数据,现在保存吗?','审计台帐管理系统',mb_iconinformation+mb_yesnocancel);
if i=idyes then
begin
if label2.caption='cxy' then
begin
filepath:=label1.caption;
Mf1book1.WriteEx(filepath,$0000000B);
cxy.filetodatabase(filepath,'sjtz');
modified:=false;
end
else
begin
if savedialog1.Execute then
mf1book1.WriteEx(filepath,$0000000B);
end;
end;
if i=idcancel then
abort;
end;
end;
procedure Tfrmf1main.N4Click(Sender: TObject);
var filepath:string;
begin
if label2.caption='cxy' then
begin
filepath:=label1.caption;
Mf1book1.WriteEx(filepath,$0000000B);
cxy.filetodatabase(filepath,'sjtz');
modified:=false;
end
else
begin
if savedialog1.Execute then
mf1book1.WriteEx(filepath,$0000000B);
end;
end;
procedure Tfrmf1main.N40Click(Sender: TObject);
begin
mf1book1.InsertDlg;
end;
procedure Tfrmf1main.N12Click(Sender: TObject);
begin
mf1book1.InsertSheets(1,1);
end;
procedure Tfrmf1main.N73Click(Sender: TObject);
begin
mf1book1.ObjCreate($00000005,mf1book1.selstartcol-1,mf1book1.SelStartrow-1,mf1book1.SelEndcol,mf1book1.SelEndrow);
end;
procedure Tfrmf1main.N45Click(Sender: TObject);
begin
mf1book1.ObjCreate($00000004,mf1book1.selstartcol-1,mf1book1.SelStartrow-1,mf1book1.SelEndcol,mf1book1.SelEndrow);
end;
procedure Tfrmf1main.N46Click(Sender: TObject);
begin
mf1book1.ObjCreate($00000001,mf1book1.selstartcol-1,mf1book1.SelStartrow-1,mf1book1.SelEndcol,mf1book1.SelEndrow);
end;
procedure Tfrmf1main.N47Click(Sender: TObject);
begin
mf1book1.ObjCreate($00000003,mf1book1.selstartcol-1,mf1book1.SelStartrow-1,mf1book1.SelEndcol,mf1book1.SelEndrow);
end;
procedure Tfrmf1main.N48Click(Sender: TObject);
begin
mf1book1.ObjCreate($00000002,mf1book1.selstartcol-1,mf1book1.SelStartrow-1,mf1book1.SelEndcol,mf1book1.SelEndrow);
end;
procedure Tfrmf1main.N51Click(Sender: TObject);
var a:longint;
begin
//mf1book1.ObjCreate($00000007,mf1book1.selstartcol-1,mf1book1.SelStartrow-1,mf1book1.SelEndcol,mf1book1.SelEndrow);
mf1book1.ObjNew($00000007,mf1book1.selstartcol-1,mf1book1.SelStartrow-1,mf1book1.SelEndcol,mf1book1.SelEndrow,a);
end;
procedure Tfrmf1main.N52Click(Sender: TObject);
begin
mf1book1.ObjCreate($0000000A,mf1book1.selstartcol-1,mf1book1.SelStartrow-1,mf1book1.SelEndcol,mf1book1.SelEndrow);
end;
procedure Tfrmf1main.N53Click(Sender: TObject);
begin
mf1book1.ObjCreate($00000009,mf1book1.selstartcol-1,mf1book1.SelStartrow-1,mf1book1.SelEndcol,mf1book1.SelEndrow);
end;
procedure Tfrmf1main.N31Click(Sender: TObject);
begin
mf1book1.EditClear(1);
end;
procedure Tfrmf1main.N32Click(Sender: TObject);
begin
mf1book1.EditClear(2);
end;
procedure Tfrmf1main.N33Click(Sender: TObject);
begin
mf1book1.EditClear(3);
end;
procedure Tfrmf1main.N34Click(Sender: TObject);
begin
mf1book1.DeleteDlg;
end;
procedure Tfrmf1main.ToolButton36Click(Sender: TObject);
var cheng:If1cellformat;
begin
cheng:=mf1book1.GetCellFormat;
cheng.Set_BorderStyle($00000003,$00000002);
Mf1book1.SetCellFormat(cheng);
end;
procedure Tfrmf1main.ToolButton35Click(Sender: TObject);
var cheng:If1cellformat;
begin
cheng:=mf1book1.GetCellFormat;
cheng.Set_BorderStyle($00000001,$00000002);
Mf1book1.SetCellFormat(cheng);
end;
procedure Tfrmf1main.ToolButton37Click(Sender: TObject);
var cheng:If1cellformat;
begin
cheng:=mf1book1.GetCellFormat;
cheng.Set_BorderStyle($00000000,$00000002);
Mf1book1.SetCellFormat(cheng);
end;
procedure Tfrmf1main.ToolButton38Click(Sender: TObject);
var cheng:If1cellformat;
begin
cheng:=mf1book1.GetCellFormat;
cheng.Set_BorderStyle($00000002,$00000002);
Mf1book1.SetCellFormat(cheng);
end;
procedure Tfrmf1main.ToolButton34Click(Sender: TObject);
var cheng:If1cellformat;
begin
cheng:=mf1book1.GetCellFormat;
cheng.Set_BorderStyle($00000000,$00000000);
cheng.set_borderstyle($00000001,$00000000);
cheng.set_borderstyle($00000002,$00000000);
cheng.set_borderstyle($00000003,$00000000);
cheng.Set_BorderStyle($FFFFFFFF,$00000000);
cheng.set_borderstyle($FFFFFFFE,$00000000);
Mf1book1.SetCellFormat(cheng);
end;
procedure Tfrmf1main.N74Click(Sender: TObject);
var cheng:If1cellformat;
begin
cheng:=mf1book1.GetCellFormat;
cheng.Set_BorderStyle($00000000,$00000002);
cheng.set_borderstyle($00000001,$00000002);
cheng.set_borderstyle($00000002,$00000002);
cheng.set_borderstyle($00000003,$00000002);
Mf1book1.SetCellFormat(cheng);
end;
procedure Tfrmf1main.N80Click(Sender: TObject);
var cheng:If1cellformat;
begin
cheng:=mf1book1.GetCellFormat;
cheng.Set_BorderStyle($00000000,$00000000);
cheng.set_borderstyle($00000001,$00000000);
cheng.set_borderstyle($00000002,$00000000);
cheng.set_borderstyle($00000003,$00000000);
cheng.Set_BorderStyle($FFFFFFFF,$00000000);
cheng.set_borderstyle($FFFFFFFE,$00000000);
Mf1book1.SetCellFormat(cheng);
end;
procedure Tfrmf1main.N79Click(Sender: TObject);
var cheng:If1cellformat;
begin
cheng:=mf1book1.GetCellFormat;
cheng.Set_BorderStyle($00000002,$00000002);
Mf1book1.SetCellFormat(cheng);
end;
procedure Tfrmf1main.N78Click(Sender: TObject);
var cheng:If1cellformat;
begin
cheng:=mf1book1.GetCellFormat;
cheng.Set_BorderStyle($00000003,$00000002);
Mf1book1.SetCellFormat(cheng);
end;
procedure Tfrmf1main.N77Click(Sender: TObject);
var cheng:If1cellformat;
begin
cheng:=mf1book1.GetCellFormat;
cheng.Set_BorderStyle($00000001,$00000002);
Mf1book1.SetCellFormat(cheng);
end;
procedure Tfrmf1main.N76Click(Sender: TObject);
var cheng:If1cellformat;
begin
cheng:=mf1book1.GetCellFormat;
cheng.Set_BorderStyle($00000000,$00000002);
Mf1book1.SetCellFormat(cheng);
end;
end.