end;
ExcelApp.Workbooks[1].WorkSheets[1].Range[Vr+':'+Hr].WrapText:=Wrap;
ExcelApp.Workbooks[1].WorkSheets[1].Range[Vr+':'+Hr].Orientation:=0;
ExcelApp.Workbooks[1].WorkSheets[1].Range[Vr+':'+Hr].AddIndent:=False;
ExcelApp.Workbooks[1].WorkSheets[1].Range[Vr+':'+Hr].IndentLevel:=0;
ExcelApp.Workbooks[1].WorkSheets[1].Range[Vr+':'+Hr].ShrinkToFit:=False;
ExcelApp.Workbooks[1].WorkSheets[1].Range[Vr+':'+Hr].ReadingOrder:=xlContext;
ExcelApp.Workbooks[1].WorkSheets[1].Range[Vr+':'+Hr].MergeCells:=Merg;
ExcelApp.Workbooks[1].WorkSheets[1].Range[Vr+':'+Hr].Font.Name:=NamFont;
ExcelApp.Workbooks[1].WorkSheets[1].Range[Vr+':'+Hr].Font.Size:=SizeFont;
ExcelApp.Workbooks[1].WorkSheets[1].Range[Vr+':'+Hr].Font.Bold:=Boldd;
ExcelApp.Workbooks[1].WorkSheets[1].Range[Vr+':'+Hr].Font.Strikethrough:=False;
ExcelApp.Workbooks[1].WorkSheets[1].Range[Vr+':'+Hr].Font.Superscript:=False;
ExcelApp.Workbooks[1].WorkSheets[1].Range[Vr+':'+Hr].Font.Subscript:=False;
ExcelApp.Workbooks[1].WorkSheets[1].Range[Vr+':'+Hr].Font.OutlineFont:=False;
ExcelApp.Workbooks[1].WorkSheets[1].Range[Vr+':'+Hr].Font.Shadow:=False;
ExcelApp.Workbooks[1].WorkSheets[1].Range[Vr+':'+Hr].Font.Underline:=xlUnderlineStyleNo
ne;
ExcelApp.Workbooks[1].WorkSheets[1].Range[Vr+':'+Hr].Font.ColorIndex:= xlAutomatic;
end;
procedure OpenWorkShet;
var FileOpen:TOpenDialog;
begin
try
FileOpen:=TOpenDialog.Create(Nil);
FileOpen.Title:='Открыть файл Microsoft Excel';
FileOpen.Filter:='Excel files|*.XLS';
if FileOpen.Execute then
begin
FileName:=FileOpen.FileName;
ExcelApp.WorkBooks.Open(FileName,False,False,Null,Null,Null,False,Null,
Null,Null,Null,Null,Null,Null,Null,0);
// NewOrOpen:=True;
end;
finally
FileOpen.Free;
FileOpen:=nil
end
end;
procedure BorderCell(Vr,Hr:OleVariant;Typ:OleVariant);
begin
ExcelApp.Workbooks[1].WorkSheets[1].Range[Vr+':'+Hr].Select;
ExcelApp.Selection.Borders[xlDiagonalDown].LineStyle:=xlNone;
ExcelApp.Selection.Borders[xlDiagonalUp].LineStyle:=xlNone;
ExcelApp.Selection.Borders.LineStyle:=xlContinuous;
ExcelApp.Selection.Borders.Weight:=xlMedium;
ExcelApp.Selection.Borders.ColorIndex:=xlAutomatic;
ExcelApp.Selection.Borders[xlInsideVertical].LineStyle:=xlNone;
ExcelApp.Selection.Borders[xlInsideHorizontal].LineStyle:=xlNone;