We help IT Professionals succeed at work.

How do I set the attribute of a column to TEXT?

Scott Stevenson
Scott Stevenson used Ask the Experts™
on
How do I set the attribute of a column to TEXT?  

I am loading a Excel spread sheet with a .CSV file.
Input
"01","KOMA01","9090909"

Excel

|1 |KOMA01|9090909

I need to change to first column to text

|01|KOMA01|9090909

Thanks,
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
1.Select the comple column by clicking on header
2. Right click
3. select Format cells
4. Change Number to Text
Scott StevensonMainframe Systems Manager

Author

Commented:
How do I do this in code/macro? VB6?
You can use the NumberFormat property to set the format of a column or cell. So for example, if you wanted to set column A to text it would be:


Code:

wrkSheet.Columns("A").numberformat = "@"