I'm exporting a data grid to an Excel spreadsheet. I'm looking for a way to
set the column formatting. We're having a problem with Excel using
exponential values for a text field that is 14 numeric characters. Is there
a way to access a Properties collection of the Excel.Application object to
iterate through in order to determine what the property name and values
are - or at least some documentation.
Thanks,
Tom
Code used to set up some column formulas etc.:
Set xlobj = GetObject(, "Excel.Application")
With xlobj
.workbooks.Open (strFileName)
With .ActiveSheet ' Paste the criteria into first sheet
j = 65 ' start at column A
For c = 0 To dataGrid.Columns.Count - 1
If (dataGrid.Columns(c).Visible = True) Then
.Range(Chr(j) & 1).Insert
.Range(Chr(j) & 1).Font.Bold = True
.Range(Chr(j) & 1).FormulaR1C1 =
dataGrid.Columns(c).Caption
j = j + 1
End If
Next c
End With
End With
Archived from group: microsoft>public>vb>enterprise