M
Mike Fellows
i have some code that pulls a large amount of data from a database
and puts it into an excel spreadsheet, some excel formulas are inserted
and the whole lot gets printed out (excel in invisble during all this), and
excel is closed
i currently setup my excel spreadsheet like this:
Dim excel_app As Object
excel_app = CreateObject("Excel.Application")
Dim row As Integer
excel_app.Visible = False
excel_app.Workbooks.Add()
With excel_app
.Columns("A:A").ColumnWidth = 20
.Range("A1").Select()
.ActiveCell.FormulaR1C1 = "Detailed Closed Report"
With .Selection.Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 18
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.ColorIndex = 0
End With
End With
As you can see, I give the column a title and set the propeties of the
column
Now what i want to do is setup wraptext on my column, ive tried .WrapText
but this
does not work.
also i need to set the alignment of the cells to vertical, again i am unable
to find the
commands that do this.
Any help with this is as usual greatly appreciated
Regards
Mike Fellows
and puts it into an excel spreadsheet, some excel formulas are inserted
and the whole lot gets printed out (excel in invisble during all this), and
excel is closed
i currently setup my excel spreadsheet like this:
Dim excel_app As Object
excel_app = CreateObject("Excel.Application")
Dim row As Integer
excel_app.Visible = False
excel_app.Workbooks.Add()
With excel_app
.Columns("A:A").ColumnWidth = 20
.Range("A1").Select()
.ActiveCell.FormulaR1C1 = "Detailed Closed Report"
With .Selection.Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 18
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.ColorIndex = 0
End With
End With
As you can see, I give the column a title and set the propeties of the
column
Now what i want to do is setup wraptext on my column, ive tried .WrapText
but this
does not work.
also i need to set the alignment of the cells to vertical, again i am unable
to find the
commands that do this.
Any help with this is as usual greatly appreciated
Regards
Mike Fellows