CVS

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

Guest

Columns MM/YY and ZIP from TXT or CSV to XLS gets corrupted. Only way to open these columns properly is

[1] Not use a CSV file
[2] Use a TXT file. Then mark column as TEXT instead of the default GENERAL type

Column 01/04 will transpose as 4-Jan
Zip Code 08648 will transpose as 8648

Is there an alternate way to open CSV files?

Please help
 
Mickey Shekdar said:
Columns MM/YY and ZIP from TXT or CSV to XLS gets corrupted. Only
way to open these columns properly is

[1] Not use a CSV file
[2] Use a TXT file. Then mark column as TEXT instead of the default
GENERAL type

Column 01/04 will transpose as 4-Jan
Zip Code 08648 will transpose as 8648

Is there an alternate way to open CSV files?

If you open CSV files from within Excel using the standard Open dialog, no.
Otherwise, yes if you're willing to use some form of scripting. You could
run a macro from within Excel to select CSV files, create copies of them
with an appended .txt extension, then open that .txt file. From Explorer,
you could write a batch file that does the same thing then starts Excel with
the copied file with the .txt extension. The latter doesn't trigger the Text
Import wizard, but it also doesn't fubar, er, parse the file either. Very
kludgy.
 
Harlan Grove said:
Mickey Shekdar said:
Columns MM/YY and ZIP from TXT or CSV to XLS gets corrupted. Only
way to open these columns properly is

[1] Not use a CSV file
[2] Use a TXT file. Then mark column as TEXT instead of the default
GENERAL type

Column 01/04 will transpose as 4-Jan
Zip Code 08648 will transpose as 8648

Is there an alternate way to open CSV files?

If you open CSV files from within Excel using the standard Open dialog, no.
Otherwise, yes if you're willing to use some form of scripting. You could
run a macro from within Excel to select CSV files, create copies of them
with an appended .txt extension, then open that .txt file. From Explorer,
you could write a batch file that does the same thing then starts Excel with
the copied file with the .txt extension. The latter doesn't trigger the Text
Import wizard, but it also doesn't fubar, er, parse the file either. Very
kludgy.

Or. Use data>import external data, find the folder and select
*.* under file types and then open the CSV file and the import wizard will
start. Then go to step 3 and select text under column data format
 
Peo Sjoblom said:
Or. Use data>import external data, find the folder and select
*.* under file types and then open the CSV file and the import wizard will
start. Then go to step 3 and select text under column data format

Much better idea *IF* the OP has Excel 2000 or later (probable). No such
feature in Excel 97 and earlier.

Still, it'd be nice if Excel would always fire up the text import wizard
when opening any text files including CSVs or provided an option to allow
users to decide whether or not to do so. Or perhaps consider rewriting the
ill-conceived CSV parser so that *any* field enclosed in double quotes would
*always* be treated as *text* rather than the current brain-dead behavior or
parsing fields first (and thus removing double quotes), then inferring data
types based on what remains.

FWIW, this is one bit of assininity Microsoft can't claim was needed for
compatibility with 123. Excel had special-purpose CSV filters back when 123
had only /FIN and /FIT, and 123 knew that a record like "123",456,"789" when
imported with /FIN was a string followed by a number followed by a string.
 
Harlan Grove said:
Much better idea *IF* the OP has Excel 2000 or later (probable). No such
feature in Excel 97 and earlier.

Still, it'd be nice if Excel would always fire up the text import wizard
when opening any text files including CSVs or provided an option to allow
users to decide whether or not to do so. Or perhaps consider rewriting the
ill-conceived CSV parser so that *any* field enclosed in double quotes would
*always* be treated as *text* rather than the current brain-dead behavior or
parsing fields first (and thus removing double quotes), then inferring data
types based on what remains.

FWIW, this is one bit of assininity Microsoft can't claim was needed for
compatibility with 123. Excel had special-purpose CSV filters back when 123
had only /FIN and /FIT, and 123 knew that a record like "123",456,"789" when
imported with /FIN was a string followed by a number followed by a string.

No disagreement from me, I agree with what you say. In 2000 it is
data>import external data>import text and then select all files
under file types.
 
Back
Top