I am creating an Excel spreadsheet in Access vba code. I need to change the column names from A, B, C, etc to a meaningful name. I have looked high and low but cannot find a way.
+7
A:
The column names in Excel cannot be changed. They are a fundamental part of how Excel operates.
When creating a spreadsheet based on a database table (sounds like what you are doing), the first row in the Excel spreadsheet will contain the field(column) names of your data. That way, when you need to read the data back into Access, or import the spreadsheet as a table; Access, by default, knows to look in the first row of the spreadsheet for the column names.
Stewbob
2009-07-24 16:18:02
As a corollary, any columns you do not give names in the first row (the "header" row) get autonamed something worthless (FieldX or FieldXX, I believe).
A. Scagnelli
2009-07-24 17:25:00
@A. Scagnelli: FWIW the names will be F1, F2, F3, etc.
onedaywhen
2009-08-01 13:40:57
+2
A:
If my memory serves me correctly, I don't believe that you can change the Column header labels from the default A
, B
, C
.
You could write the header names out in the first row of the spreadsheet
Russ Cam
2009-07-24 16:18:49