Kind of the inverse of this question.
I frequently download CSVs from outside sources as part of my programming work. I like to examine their data in Excel because, let's face it, Excel is an ideal tool for this sort of thing.
Except for one behavior: Excel attempts to outwit the data in the CSV, and therefore, if something looks like a number (like, say, many ISBN/EAN codes), Excel will treat it as such. And if this number is really big (like pretty much all ISBN/EAN codes), Excel will turn the number into scientific notation. Finally, if the number isn't particularly big, with most of these data formats, that indicates that Excel has decided that my number shouldn't have leading zeroes.
So ... Is there a way to open a CSV (via double-click if possible, but I'm willing to compromise here) in such a way that I can have Excel 2007 treat all the columns as text?
Answer
You can, but it takes a couple of manual steps. These steps are from Excel 2003, but I'd assume the wizard is similar in 2007:
- Rename the file as TXT. Don't double-click it.
- Open Excel
- Click File, Open
- Locate and double-click the text file
- It should open a "Text Import Wizard"
- In step one, choose "Delimited"
- In step two, uncheck "tab" and check "comma"
- In step three, scroll-over to the last column, shift-click to select all columns, then click "Text" as the format.
- Ignore the annoying "Number stored as text" warnings everywhere
Goes pretty fast with some practice.
No comments:
Post a Comment