mian.pas
{利用 EXECL 的打印预览、打印。
EXEC 可直接读取 *.DBF。
把要打印的数据输出为 *.DBF
}
unit main;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls,
Forms,Dialogs,StdCtrls, printers, OleServer, Excel97;
type
TForm1 = class(TForm)
Btn_in: TButton;
Btn_out: TButton;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Edit_schoolname: TEdit;
Edit_degree: TEdit;
Edit_specialty: TEdit;
Edit_learnyear: TEdit;
Edit_date: TEdit;
Button2: TButton;
SaveDialog1: TSaveDialog;
Button1: TButton;
Edit1: TEdit;
Button3: TButton;
Op1: TOpenDialog;
Button4: TButton;
Edit2: TEdit;
procedure Btn_inClick(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Btn_outClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure Edit_inChange(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
XLApp1: Variant;
procedure PrintSet;
procedure PrintPre;
//预览
procedure InsertData;
procedure outtext;
{ Private declarations }
public
mypath:string;
//program path
{ Public declarations }
end;
const
maxuser=5000;
var
Form1: TForm1;
implementation
uses ComObj, XLConst;
{$R *.DFM}
procedure Tform1.PrintSet;
var
Sheet: Variant;
begin
Sheet := XLApp1.Workbooks[1].WorkSheets['毕业生录入'];
Sheet.PageSetup.PrintTitleRows :='$1:$3';//固定表头行。
Sheet.PageSetup.PrintTitleColumns := '';
//固定表头列。
{Sheet.PageSetup.PageSetup.PrintArea := '';
Sheet.PageSetup.LeftHeader := '';
Sheet.PageSetup.CenterHeader := '';
Sheet.PageSetup.RightHeader := '';}
Sheet.PageSetup.LeftFooter := '注
1)本表一式两份,省干教和学校各存一份。(2)本表毕业证编号由省干教办统一编写。'
+' 总共&N页'+'--第&P页';
{ Sheet.PageSetup.CenterFooter := '';
Sheet.PageSetup.RightFooter := '';
}
Sheet.PageSetup.LeftMargin :=1.2;
Sheet.PageSetup.RightMargin :=1.2;
Sheet.PageSetup.TopMargin := 35;
Sheet.PageSetup.BottomMargin :=60;
Sheet.PageSetup.HeaderMargin :=42;
sheet.PageSetup.FooterMargin:=40;
{ Sheet.PageSetup.PrintHeadings := False;
Sheet.PageSetup.PrintGridlines := False;
Sheet.PageSetup.PrintComments := xlPrintNoComments;}
// Sheet.PageSetup.PrintQuality := 400;///向红林屏闭
Sheet.PageSetup.CenterHorizontally := True;
// Sheet.PageSetup.CenterVertically := True;
Sheet.PageSetup.Orientation := 2;
//1:纵向 2横向 打印
Sheet.PageSetup.Draft := False;
//非草稿模式
Sheet.PageSetup.PaperSize:=xlPaperA4;//页面大小设置
Sheet.PageSetup.FirstPageNumber :=xlAutomatic;
//Sheet.PageSetup.Order := xlDownthen
Over;
Sheet.PageSetup.BlackAndWhite := True;
Sheet.PageSetup.Zoom :=100;
end;
procedure Tform1.PrintPre;
var
Range,Range1,Range2,Sheet: Variant;
i,hi1,hi2,usedRows:integer;
tmpstr:string;
begin
Sheet:= XLApp1.Workbooks[1].WorkSheets['毕业生录入'];
usedRows:= Sheet.UsedRange.Rows.Count;//得到用掉的行数
if usedRows>maxuser then
begin
showmessage('数据太多了,处理不了');
exit;
end else
begin
hi2:=((usedRows-4) div 20)+1;
hi1:=hi2*21+4;
if hi2>1 then
for i:=1 to hi2do
begin
sheet.range['a'+inttostr(i*21+3)+':m'+inttostr(i*21+3)].insert;//插入小计行
sheet.cells[(i*21+3),1]:='小计:';
sheet.cells[(i*21+3),1].Characters.Font.FontStyle :='加粗';
sheet.cells[(i*21+3),2].FormulaR1C1:= '=max(R[-20]C:R[-1]C)';//公式
sheet.cells[(i*21+3),12].FormulaR1C1:= '=SUM(R[-20]c:R[-1]c)';
if i< hi2 then
Sheet.HPageBreaks.add(Sheet.Cells[i*21+4,1]);//插入分页符
end;
sheet.range['a'+inttostr(hi1)+':m'+inttostr(hi1)].insert;//插入合计行
sheet.cells[hi1,1]:='合计:';
sheet.cells[hi1,1].Characters.Font.FontStyle :='加粗';
sheet.cells[hi1,1].RowHeight := 16;//高
if hi1> 25 then
sheet.cells[hi1,12].FormulaR1C1:= '=SUM(R[-'
+inttostr(hi1-4)+']c:R[-1]c)/2'
else
sheet.cells[hi1,12].FormulaR1C1:= '=SUM(R[-21]c:R[-1]c)';
tmpstr:='A3'+':'+'M'+inttostr(hi1);
Range := XLApp1.Workbooks[1].WorkSheets['毕业生录入'].Range[tmpstr];
Range.Borders.LineStyle:=1;//划框线。
Range.Borders.weight:=strtoint(edit2.text);//划框线。
XLApp1.Visible :=True;
sheet.PrintPreView;//打印予显;
end;
end;
procedure Tform1.InsertData;
var Sheet, Range: Variant;
tmpstr:string;
begin
Range :=XLApp1.Workbooks[1].WorkSheets['毕业生录入'].Range['A1:M1'];//
range.ClearContents;
Range :=XLApp1.Workbooks[1].WorkSheets['毕业生录入'].Range['A1:M2'];//
range.insert;//插入空行
Range :=XLApp1.Workbooks[1].WorkSheets['毕业生录入'].Range['A1:M1'];//
Range.HorizontalAlignment := xlCenter;//
Range.VerticalAlignment := xlCenter;//格式
Range.WrapText := False;
Range.Orientation := 0;
Range.AddIndent := False;
Range.ShrinkToFit := False;
Range.MergeCells := False;
Range.Merge;//合并单元格
Range.Rows.RowHeight := 46;//高
//写入标题
Range.FormulaR1C1 :='毕业证表';
//设置字体
Range.Characters.Font.Name :='Times New Roman';
Range.Characters.Font.FontStyle := '加粗';
Range.Characters.Font.Size := 35;
//* Range.Characters.Font.Strikethrough := False;
//* Range.Characters.Font.Superscript := False;
//* Range.Characters.Font.Subscript := False;
//* Range.Characters.Font.OutlineFont := False;
//* Range.Characters.Font.Shadow := False;
//设置边框
//学校信息
Range := XLApp1.Workbooks[1].WorkSheets['毕业生录入'].Range['A2:M2'];
Range.Merge;
Range.Rows.RowHeight := 20;
tmpstr:='学校名称(盖章):'+form1.Edit_schoolname.Text+' '
+'学历层次:'+form1.Edit_degree.Text+' '
+'专业:'+form1.Edit_specialty.Text+' '
+'学制:'+form1.Edit_learnyear.Text+' '
+form1.Edit_date.Text;
Range.FormulaR1C1 :=tmpstr;
Range.HorizontalAlignment := xlCenter;
Range.VerticalAlignment := xlCenter;
Range.Characters.Font.Name := '宋体';
Range.Characters.Font.FontStyle :='加粗';
Range.Characters.Font.Size := 12;
Range.Characters.Font.Strikethrough := False;
Range.Characters.Font.Superscript := False;
Range.Characters.Font.Subscript := False;
Range.Characters.Font.OutlineFont := False;
Range.Characters.Font.Shadow := False;
Range.Characters.Font.ColorIndex := xlAutomatic;
//提示信息
Sheet := XLApp1.Workbooks[1].WorkSheets['毕业生录入'];
Sheet.Cells[3,1] :='编号';
Sheet.Cells[3,2] :='毕业证编号';
Sheet.Cells[3,3] :='姓名';
Sheet.Cells[3,4] :='性别';
Sheet.Cells[3,5] :='民族';
Sheet.Cells[3,6] :='年龄';
Sheet.Cells[3,7] :='籍贯';
Sheet.Cells[3,8] :='文化程度';
Sheet.Cells[3,9] :='参加工作年月';
Sheet.Cells[3,10] :='政治面貌';
Sheet.Cells[3,11] :='单位名称及职务';
Sheet.Cells[3,12] :='学业成绩总评';
Sheet.Cells[3,13] :='身份证号';
//设置提示信息格式
Range := XLApp1.Workbooks[1].WorkSheets['毕业生录入'].Range['A3:M3'];
Range.Rows.RowHeight := 31;
Range.HorizontalAlignment := xlCenter;
Range.VerticalAlignment := xlCenter;
Range.WrapText := True;
Range.Characters.Font.Name := '宋体';
Range.Characters.Font.FontStyle :='加粗';
Range.Characters.Font.Size := 12;
{
Range.Characters.Font.Strikethrough := False;
Range.Characters.Font.Superscript := False;
Range.Characters.Font.Subscript:= False;
Range.Characters.Font.OutlineFont:= False;
Range.Characters.Font.Shadow:= False;
}
Range.Characters.Font.ColorIndex := xlAutomatic;
Range.Columns[1].ColumnWidth := 13;
Sheet.Columns[1].NumberFormat := '000000000000';//
Range.Columns[2].ColumnWidth := 13;
Sheet.Columns[2].NumberFormat := '000000000000';
Range.Columns[3].ColumnWidth := 8;
Range.Columns[4].ColumnWidth := 3;
Range.Columns['E:E'].ColumnWidth := 4;
Range.Columns['F:F'].ColumnWidth := 3;
Range.Columns['G:G'].ColumnWidth := 4;
Range.Columns['H:H'].ColumnWidth := 5;
Range.Columns['I:I'].ColumnWidth := 10;
Sheet.Columns['i:i'].NumberFormat := 'yyyy-mm-dd';
Range.Columns['J:J'].ColumnWidth := 5;
Range.Columns['K:K'].ColumnWidth := 22;
Range.Columns['L:L'].ColumnWidth := 7;
Sheet.Columns[12].NumberFormat := '0.0';
Range.Columns['M:M'].ColumnWidth := 20;
Sheet.Cells[4,2].Select;
end;
procedure TForm1.Btn_inClick(Sender: TObject);
var filename:string;
begin
op1.Execute ;
filename:=op1.FileName ;
XLApp1:= CreateOleObject('Excel.Application');
XLApp1.Visible :=True;
if filename<>'' then
XLApp1.Workbooks.Open(filename)
else
XLApp1.Workbooks.Add(xlWBatWorkSheet);
//工作表名设置
XLApp1.Workbooks[1].WorkSheets[1].Name:='毕业生录入';
PrintSet;
//页面设置
InsertData;
//插入数据
Btn_in.Enabled:=false;
Btn_out.Enabled:=true;
Button2.Enabled:=true;
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
if not VarIsEmpty(XLApp1) then
begin
XLApp1.DisplayAlerts := false;
XLApp1.Quit;
end;
// if not VarIsEmpty(VarObject) then
// VarObject.WorkBooks[1].Close(True, 'c:/TEMP/sample.xls');
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Mypath:=ExtractFilePath(application.exename);
btn_in.Enabled:=false;
Button2.Enabled:=false;
btn_out.Enabled:=false;
end;
procedure TForm1.outtext;
var
kslrfilename:string;
kslrfile:textfile;
i:integer;
Sheet: Variant;
laststr:string;
function writeflatstr:string;
var
flatstr:array[1..5]of string;
begin
with form1do
begin
flatstr[1]:=Edit_schoolname.Text;
flatstr[2]:=Edit_degree.Text;
flatstr[3]:=Edit_specialty.Text;
flatstr[4]:=Edit_learnyear.Text;
flatstr[5]:=Edit_date.Text;
result:=flatstr[1]+','+flatstr[2]+','+flatstr[3]+','
+flatstr[4]+','+flatstr[5];
end;
end;
function writeRecstr:string;
var
Recstr:array[1..13]of string;
j:integer;
begin
for j:=1 to 13do
Recstr[j]:=Sheet.Cells[i+1,j];
if Length(Recstr[1])=10 then
Recstr[1]:='0'+Recstr[1];
if Length(Recstr[2])=10 then
Recstr[2]:='0'+Recstr[1];
result:=Recstr[1]+',' +Recstr[2]+','
+Recstr[3]+',' +Recstr[4]+','
+Recstr[5]+',' +Recstr[6]+','
+Recstr[7]+',' +Recstr[8]+','
+Recstr[9]+',' +Recstr[10]+','
+Recstr[11]+','+Recstr[12]+','
+Recstr[13];
end;
begin
kslrfilename:=Mypath+'毕业生生录入.par';
assignfile(kslrfile,kslrfilename);
rewrite(kslrfile);
writeln(kslrfile,'毕业生录入');
writeln(kslrfile,writeflatstr);
Sheet := XLApp1.Workbooks[1].WorkSheets[1];
i:=3;
laststr:=Sheet.Cells[i+1,1];
while (laststr<>'') and (i<=maxuser)do
begin
Writeln(kslrfile,writeRecstr);
Inc(i);
laststr:=Sheet.Cells[i+1,1];
end;
if i>=maxuser then
begin
showmessage('数据太多,只完成了5000个数据');
end else
showmessage('导出完成');
closefile(kslrfile);
beep;
end;
procedure TForm1.Btn_outClick(Sender: TObject);
begin
showmessage(' 注 意:'
+#13+'由于打印前会导出大量数据,'
+#13+'请等待…,'
+#13+'直到出现导出完成的对话框。');
//('开始数据处理!');
{
outtext;
Btn_out.Enabled:=false;
Button2.Enabled :=false;
}
PrintPre;
end;
procedure TForm1.FormShow(Sender: TObject);
var
year,month,day:word;
begin
DecodeDate(date,year,month,day);
// Edit_schoolname.Text:='';
Edit_date.Text:=inttostr(year)+'年'
+inttostr(month)+'月'
+inttostr(day)+'日';
{ Edit_degree.Text:='';
Edit_specialty.Text:='';
Edit_learnyear.Text:='';}
end;
procedure TForm1.Edit_inChange(Sender: TObject);
begin
if (Edit_schoolname.text<>'')
and(Edit_date.Text<>'')
and(Edit_degree.Text<>'')
and(Edit_specialty.Text<>'')
and(Edit_learnyear.Text<>'')
then
btn_in.Enabled:=true else
btn_in.Enabled:=false;
end;
procedure TForm1.Button2Click(Sender: TObject);
var Sheet: Variant;
begin
Sheet := XLApp1.Workbooks[1].WorkSheets['毕业生录入'];
Sheet.PageSetup.Orientation := 1;//1:纵向 2横向 打印
Sheet.PageSetup.PaperSize:=xlPaperEnvelopeB5;//纸张大小
Sheet.PageSetup.Zoom :=90;
//比例
Sheet.PageSetup.LeftMargin :=1 ;//左边界
Sheet.PageSetup.RightMargin :=1;//右边界
end;
procedure TForm1.Button1Click(Sender: TObject);
var a,d:Tdate;
f,b,c:word;
begin
d:=strtodate(edit1.text);
DecodeDate(d,b,c,f);
a:=encodedate(b,c,1);
showmessage(inttostr(trunc(incmonth(a,1)-a)));
end;
procedure TForm1.Button3Click(Sender: TObject);
var range1,range2: Variant;
begin
Range1 :=XLApp1.Workbooks[1].WorkSheets['毕业生录入'].Range['A4:M5'];
Range1.Interior.ColorIndex :=6;
Range2 :=XLApp1.Workbooks[1].WorkSheets['毕业生录入'].Range['A4:M20'];
range1.AutoFill(range2);
Range1.Interior.ColorIndex :=46;
end;
end.
*************************
XLConst.pas
unit XLConst;
interface
const
{ XlSheetType }
xlChart = -4109;
xlDialogSheet = -4116;
xlExcel4IntlMacroSheet = 4;
xlExcel4MacroSheet = 3;
xlWorksheet = -4167;
{ XlWBATemplate }
xlWBATChart = -4109;
xlWBATExcel4IntlMacroSheet = 4;
xlWBATExcel4MacroSheet = 3;
xlWBATWorksheet = -4167;
{ XlPattern }
xlPatternAutomatic = -4105;
xlPatternChecker = 9;
xlPatternCrissCross = 16;
xlPatternDown = -4121;
xlPatternGray16 = 17;
xlPatternGray25 = -4124;
xlPatternGray50 = -4125;
xlPatternGray75 = -4126;
xlPatternGray8 = 18;
xlPatternGrid = 15;
xlPatternHorizontal = -4128;
xlPatternLightDown = 13;
xlPatternLightHorizontal = 11;
xlPatternLightUp = 14;
xlPatternLightVertical = 12;
xlPatternNone = -4142;
xlPatternSemiGray75 = 10;
xlPatternSolid = 1;
xlPatternUp = -4162;
xlPatternVertical = -4166;
{ XlBordersIndex }
xlInsideHorizontal = 12;
xlInsideVertical = 11;
xlDiagonalDown = 5;
xlDiagonalUp = 6;
xlEdgeBottom = 9;
xlEdgeLeft = 7;
xlEdgeRight = 10;
xlEdgeTop = 8;
{ XlLineStyle }
xlContinuous = 1;
xlDash = -4115;
xlDashDot = 4;
xlDashDotDot = 5;
xlDot = -4118;
xlDouble = -4119;
xlSlantDashDot = 13;
xlLineStyleNone = -4142;
{ XlChartType }
xlColumnClustered = 51;
xlColumnStacked = 52;
xlColumnStacked100 = 53;
xl3DColumnClustered = 54;
xl3DColumnStacked = 55;
xl3DColumnStacked100 = 56;
xlBarClustered = 57;
xlBarStacked = 58;
xlBarStacked100 = 59;
xl3DBarClustered = 60;
xl3DBarStacked = 61;
xl3DBarStacked100 = 62;
xlLineStacked = 63;
xlLineStacked100 = 64;
xlLineMarkers = 65;
xlLineMarkersStacked = 66;
xlLineMarkersStacked100 = 67;
xlPieOfPie = 68;
xlPieExploded = 69;
xl3DPieExploded = 70;
xlBarOfPie = 71;
xlXYScatterSmooth = 72;
xlXYScatterSmoothNoMarkers = 73;
xlXYScatterLines = 74;
xlXYScatterLinesNoMarkers = 75;
xlAreaStacked = 76;
xlAreaStacked100 = 77;
xl3DAreaStacked = 78;
xl3DAreaStacked100 = 79;
xlDoughnutExploded = 80;
xlRadarMarkers = 81;
xlRadarFilled = 82;
xlSurface = 83;
xlSurfaceWireframe = 84;
xlSurfaceTopView = 85;
xlSurfaceTopViewWireframe = 86;
xlBubble = 15;
xlBubble3DEffect = 87;
xlStockHLC = 88;
xlStockOHLC = 89;
xlStockVHLC = 90;
xlStockVOHLC = 91;
xlCylinderColClustered = 92;
xlCylinderColStacked = 93;
xlCylinderColStacked100 = 94;
xlCylinderBarClustered = 95;
xlCylinderBarStacked = 96;
xlCylinderBarStacked100 = 97;
xlCylinderCol = 98;
xlConeColClustered = 99;
xlConeColStacked = 100;
xlConeColStacked100 = 101;
xlConeBarClustered = 102;
xlConeBarStacked = 103;
xlConeBarStacked100 = 104;
xlConeCol = 105;
xlPyramidColClustered = 106;
xlPyramidColStacked = 107;
xlPyramidColStacked100 = 108;
xlPyramidBarClustered = 109;
xlPyramidBarStacked = 110;
xlPyramidBarStacked100 = 111;
xlPyramidCol = 112;
xl3DColumn = -4100;
xlLine = 4;
xl3DLine = -4101;
xl3DPie = -4102;
xlPie = 5;
xlXYScatter = -4169;
xl3DArea = -4098;
xlArea = 1;
xlDoughnut = -4120;
xlRadar = -4151;
//***
{打印纸}
{
xla5=11;
xla4=9;
xla3=8;
xla2=258;
xlb4=12;
xlb5=13;
xl16k=93;
xl32k=94;
xlbig32k=95;}
//***
{ Various Constants }
xlAll = -4104;
xlAutomatic = -4105;
xlBoth = 1;
xlCenter = -4108;
xlChecker = 9;
xlCircle = 8;
xlCorner = 2;
xlCrissCross = 16;
xlCross = 4;
xlDiamond = 2;
xlDistributed = -4117;
xlDoubleAccounting = 5;
xlFixedValue = 1;
xlFormats = -4122;
xlGray16 = 17;
xlGray8 = 18;
xlGrid = 15;
xlHigh = -4127;
xlInside = 2;
xlJustify = -4130;
xlLightDown = 13;
xlLightHorizontal = 11;
xlLightUp = 14;
xlLightVertical = 12;
xlLow = -4134;
xlManual = -4135;
xlMinusValues = 3;
xlModule = -4141;
xlNextToAxis = 4;
xlNone = -4142;
xlNotes = -4144;
xlOff = -4146;
xlOn = 1;
xlPercent = 2;
xlPlus = 9;
xlPlusValues = 2;
xlSemiGray75 = 10;
xlShowLabel = 4;
xlShowLabelAndPercent = 5;
xlShowPercent = 3;
xlShowValue = 2;
xlSimple = -4154;
xlSingle = 2;
xlSingleAccounting = 4;
xlSolid = 1;
xlSquare = 1;
xlStar = 5;
xlStError = 4;
xlToolbarButton = 2;
xlTriangle = 3;
xlGray25 = -4124;
xlGray50 = -4125;
xlGray75 = -4126;
xlBottom = -4107;
xlLeft = -4131;
xlRight = -4152;
xlTop = -4160;
xl3DBar = -4099;
xl3DSurface = -4103;
xlBar = 2;
xlColumn = 3;
xlCombination = -4111;
xlCustom = -4114;
xlDefaultAutoFormat = -1;
xlMaximum = 2;
xlMinimum = 4;
xlOpaque = 3;
xlTransparent = 2;
xlBidi = -5000;
xlLatin = -5001;
xlContext = -5002;
xlLTR = -5003;
xlRTL = -5004;
xlVisualCursor = 2;
xlLogicalCursor = 1;
xlSystem = 1;
xlPartial = 3;
xlHindiNumerals = 3;
xlBidiCalendar = 3;
xlGregorian = 2;
xlComplete = 4;
xlScale = 3;
xlClosed = 3;
xlColor1 = 7;
xlColor2 = 8;
xlColor3 = 9;
xlConstants = 2;
xlContents = 2;
xlBelow = 1;
xlCascade = 7;
xlCenterAcrossSelection = 7;
xlChart4 = 2;
xlChartSeries = 17;
xlChartShort = 6;
xlChartTitles = 18;
xlClassic1 = 1;
xlClassic2 = 2;
xlClassic3 = 3;
xl3DEffects1 = 13;
xl3DEffects2 = 14;
xlAbove = 0;
xlAccounting1 = 4;
xlAccounting2 = 5;
xlAccounting3 = 6;
xlAccounting4 = 17;
xlAdd = 2;
xlDebugCodePane = 13;
xlDesktop = 9;
xlDirect = 1;
xlDivide = 5;
xlDoubleClosed = 5;
xlDoubleOpen = 4;
xlDoubleQuote = 1;
xlEntireChart = 20;
xlExcelMenus = 1;
xlExtended = 3;
xlFill = 5;
xlFirst = 0;
xlFloating = 5;
xlFormula = 5;
xlGeneral = 1;
xlGridline = 22;
xlIcons = 1;
xlImmediatePane = 12;
xlInteger = 2;
xlLast = 1;
xlLastCell = 11;
xlList1 = 10;
xlList2 = 11;
xlList3 = 12;
xlLocalFormat1 = 15;
xlLocalFormat2 = 16;
xlLong = 3;
xlLotusHelp = 2;
xlMacrosheetCell = 7;
xlMixed = 2;
xlMultiply = 4;
xlNarrow = 1;
xlNoDocuments = 3;
xlOpen = 2;
xlOutside = 3;
xlReference = 4;
xlSemiautomatic = 2;
xlShort = 1;
xlSingleQuote = 2;
xlStrict = 2;
xlSubtract = 3;
xlTextBox = 16;
xlTiled = 1;
xlTitleBar = 8;
xlToolbar = 1;
xlVisible = 12;
xlWatchPane = 11;
xlWide = 3;
xlWorkbookTab = 6;
xlWorksheet4 = 1;
xlWorksheetCell = 3;
xlWorksheetShort = 5;
xlAllExceptBorders = 6;
xlLeftToRight = 2;
xlTopToBottom = 1;
xlVeryHidden = 2;
xlDrawingObject = 14;
implementation
end.
************
mian.dfm
bject Form1: TForm1
Left = 208
Top = 130
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
Caption = '党校管理系统'
ClientHeight = 218
ClientWidth = 397
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 20
object Label1: TLabel
Left = 24
Top = 48
Width = 74
Height = 20
Caption = '学校名称:'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
Transparent = True
end
object Label2: TLabel
Left = 24
Top = 120
Width = 74
Height = 20
Caption = '学历层次:'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
Transparent = True
end
object Label3: TLabel
Left = 136
Top = 120
Width = 40
Height = 20
Caption = '专业:'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
Transparent = True
end
object Label4: TLabel
Left = 328
Top = 120
Width = 40
Height = 20
Caption = '学制:'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
Transparent = True
end
object Label5: TLabel
Left = 232
Top = 48
Width = 40
Height = 20
Caption = '日期:'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
Transparent = True
end
object Label6: TLabel
Left = 8
Top = 16
Width = 362
Height = 24
Caption = '党校系统学历教育毕业证书证书验印申请表'
Font.Charset = DEFAULT_CHARSET
Font.Color = clNavy
Font.Height = -19
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object Btn_in: TButton
Left = 2
Top = 184
Width = 86
Height = 29
Caption = '毕业生录入'
TabOrder = 4
OnClick = Btn_inClick
end
object Btn_out: TButton
Left = 92
Top = 184
Width = 86
Height = 29
Caption = '打印/预览'
TabOrder = 5
OnClick = Btn_outClick
end
object Edit_schoolname: TEdit
Left = 24
Top = 72
Width = 185
Height = 28
TabOrder = 0
Text = '学院'
OnChange = Edit_inChange
end
object Edit_degree: TEdit
Left = 14
Top = 144
Width = 97
Height = 28
TabOrder = 1
Text = '大本'
OnChange = Edit_inChange
end
object Edit_specialty: TEdit
Left = 123
Top = 144
Width = 169
Height = 28
TabOrder = 2
Text = '计算机及应用'
OnChange = Edit_inChange
end
object Edit_learnyear: TEdit
Left = 307
Top = 144
Width = 73
Height = 28
TabOrder = 3
Text = '4 年'
OnChange = Edit_inChange
end
object Edit_date: TEdit
Left = 232
Top = 72
Width = 145
Height = 28
TabOrder = 6
OnChange = Edit_inChange
end
object Button2: TButton
Left = 182
Top = 184
Width = 86
Height = 29
Caption = '设置纸B5'
TabOrder = 7
OnClick = Button2Click
end
object Button1: TButton
Left = 232
Top = 112
Width = 75
Height = 25
Caption = '日期'
TabOrder = 8
OnClick = Button1Click
end
object Edit1: TEdit
Left = 304
Top = 40
Width = 113
Height = 28
TabOrder = 9
Text = '2000-2-22'
end
object Button3: TButton
Left = 272
Top = 184
Width = 89
Height = 25
Caption = '公式套用'
TabOrder = 10
OnClick = Button3Click
end
object Button4: TButton
Left = 104
Top = 104
Width = 65
Height = 17
Caption = 'Button4'
TabOrder = 11
end
object Edit2: TEdit
Left = 160
Top = 48
Width = 65
Height = 28
TabOrder = 12
Text = '1'
end
object SaveDialog1: TSaveDialog
Left = 184
Top = 24
end
object Op1: TOpenDialog
Filter = '*.dbf|*.dbf|*.xls|*.xls|*.htm|*.hym'
Left = 120
Top = 32
end
end
************