View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default Problem with CSV file

Right.
--
David Biddulph

"JoeSpareBedroom" wrote in message
...
Hang on a second here. I mentioned that the CSV from the customer contains
two sheets. As far as I know, that really can't be a CSV file. I mean, a
CSV is nothing but a text file containing commas as delimiters. It can't
have multiple sheets. Right?


"JP" wrote in message
...
You should never reopen CSV files "just to check" them, this will
damage any number formatting you created when you saved the file. If
you still have access to the original CSV files, the file should not
be opened but imported, on the odd chance that you do need to check it
before importing into the other program.

1. From the menu, select Data/Import External Data/Import Data
2. Select the Delimited radio button, then click "Next"
3. In Step 3, select the columns that you want to be treated as text
(the UPC codes in your case) and in the Column Data Format box, choose
'Text' and hit Finish.


On Nov 20, 3:15 pm, "JoeSpareBedroom" wrote:
A customer has sent me a csv file which contains two sheets when opened
in
Excel 2000. This was done because the first sheet contained the maximum
number of records Excel can handle. I need to import these lists into
Paradox (a database), so I need to separate the two sheets into separate
files, each saved as its own csv.

In one of the columns, I've got long strings of data as shown below.
These
are UPC codes, and will never be used as numbers - just text.

10323900002958
10323900002965
16500505693
10323900005409
10323900006147
10015400022436

When I separate the two sheets into their own notebooks, and save as csv
files with new names, a problem arises. When I either import the data
into
Paradox, or reopen the sheets in Excel, I find that this is what's
happened
to the list shown above:

1.03239E+13
1.03239E+13
16500505693
1.03239E+13
1.03239E+13
1.00154E+13

The shortest value is untouched, but the rest convert to exponent
format.
So, I figured Excel was seeing these as numbers. I opened a new sheet,
formatted all cells as text, and tried copying the data to that sheet,
using
Paste Special / Values. Same problem. I'm am definitely choosing the
right
file type before doing the Save As.

Even stranger: If I view the new csv file in a text editor like WinEdit,
these strings look fine.

Help!