Comment in query output as Excel?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi -I've got a macro that outputs query results as an excel sheet.
I need to put a specific comment on the excel sheet headers -is this doable
without human labor??
Also data validation/conditional formatting would be great but not
necessary. ;-)
thanks in advance
 
Terminology?
human labor

Physical (e.g. mouse clicks) or mental (e.g. write code)?
specific comment on the excel sheet headers

Do you mean a change the text in the column header? Alias the column
in the query e.g.

SELECT MyDataCol AS [Note to Excel user: this data is from MyTable]
FROM MyTable;

Or do you mean an Excel cell comment i.e. in the UI, a red triangle in
the corner of the cell, hover the mouse and get a big yellow tooltip?
You can create this by automating Excel in VBA code, opening the
workbook and creating the cell comment. VBA may be used in the same
way AFAIK to create data validation rules and conditional formatting.

Jamie.

--
 
Back
Top