Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

exporting data to an excel - hidden column 1

Status
Not open for further replies.

GelC

Technical User
Oct 3, 2006
93
US
Hi all,
I'm using a database to enter and export data.
When I export data to an excel spreadsheet, for some reason, there is an hidden header column which I can only see it either when I click on that particular cell or select the whole column.
I want to eliminate this problem. Is it something to do with the coding?
Thanks for any help

 
Post the code or line that does the export.

What exactly do you mean by hidden? The value is hidden or the cell is hidden?
 
The problem likes in MS Word, you make text in white color, and you can only see the text when you hi-light it.
Code:
        'hide myID column by changing font to white
        strRange = "A6:A" & rw
        xlSheet1.Range(strRange).Select
        With xlApp.Range(strRange)
            .Font.ColorIndex = 2
        End With

now I don't want to see this column anymore, even it is hidden in white text, is it doable?
Many thanks
 

Yes! Don't export that column. Create a query, select the fields you like from that table and export that. About hidden condition in excel, this has to do with the formatting of the excel sheet.
 
'hide myID column
xlSheet1.Columns(1).Hidden = True

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks for all great help.
I found that delete column also work.
Great forum!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top