View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bill Manville Bill Manville is offline
external usenet poster
 
Posts: 473
Default Format when opening .CSV file in Excel

Mohan wrote:
We are creating .CSV file( comma delieminated) from the
Web Page so that users can use Excel to view the file.
The issue is with format.


We like the data to be left formatted. Also like Excel
NOT to drop leading zeros.
Can this be done using .CSV format? If not what options

we have


If the file extension is CSV, Excel gives you no options.
If the file extension is something else, Excel will show the Text
Import wizard; you can specify certain columns to be treated as text,
which should preserve the leading zeros.
Left alignment would need to be done by a macro after the import.

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup