Sub Click(Source As Button)
Dim xl As Variant
Dim xlWbk As Variant
Dim xlSh As Variant
Dim Header(1 To 9) As String
Set xl=CreateObject("Excel.Application")
Set xlWbk=xl.Workbooks.Add
Set xlSh = xl.WorkSheets.Add
xlSh.Name = "Привет"
Header(1)="один"
Header(2)="два"
Header(3)="три"
Header(4)="четыре"
Header(5)="пять"
Header(6)="шесть"
Header(7)="семь"
Header(8)="восемь"
Header(9)="девять"
xlWbk.ActiveSheet.Range(xlWbk.ActiveSheet.Cells(2,2),xlWbk.ActiveSheet.Cells(2,10)).WrapText=True
xlWbk.ActiveSheet.Range(xlWbk.ActiveSheet.Cells(2,2),xlWbk.ActiveSheet.Cells(2,10)).VerticalAlignment=1
xlWbk.ActiveSheet.Range(xlWbk.ActiveSheet.Cells(2,2),xlWbk.ActiveSheet.Cells(2,10)).Font.Size=8
xlWbk.ActiveSheet.Range(xlWbk.ActiveSheet.Cells(2,2),xlWbk.ActiveSheet.Cells(2,10)).Font.Bold=True
xlWbk.ActiveSheet.Range(xlWbk.ActiveSheet.Cells(2,2),xlWbk.ActiveSheet.Cells(2,10)).Borders.LineStyle=1
xlWbk.ActiveSheet.Range(xlWbk.ActiveSheet.Cells(2,2),xlWbk.ActiveSheet.Cells(2,10)).Borders.Weight=3
xlWbk.ActiveSheet.Range(xlWbk.ActiveSheet.Cells(2,2),xlWbk.ActiveSheet.Cells(2,10))=Header
xl.Visible=True
End Sub