csv issues.

This is a discussion on csv issues. within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I have a text file that when i convert to a csv file and open it up, some of the ...

  1. #1
    Registered User caroundw5h's Avatar
    Join Date
    Oct 2003
    Posts
    751

    csv issues.

    I have a text file that when i convert to a csv file and open it up, some of the information is missing. it seems to be only a number or two, but its annoying. i a string is supposed to be nine digits sometimes one or 2 digits might be missing. This only happens with the numbers by the way. Why are some truncated and how can i avoid this?

    Thank you?

  2. #2
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949
    How are you converting it? Your own program? Commercial program? Do I care?
    Do not make direct eye contact with me.

  3. #3
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    >Do I care?
    God. Someone's in a ..........ty mood today. Try to keep it to yourself, OK?
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  4. #4
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949
    At least I gave him some questions to consider .

    Actually, I'm in a pretty good mood. Occasionally, my mind decides to make me a jerk. I wonder if there's some mental disease that does that?
    Do not make direct eye contact with me.

  5. #5
    Registered User caroundw5h's Avatar
    Join Date
    Oct 2003
    Posts
    751
    we're all entitled to our bad days. its all good bi**h!!!

    anyways the way i convert it is simple select the text file then save it as a .csv file. all the info in it is comma delimited. but as i said when i open it up, it seems to truncate some of the sequences

  6. #6
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949
    OK, so you take a .txt file, simply rename it to .csv, open it in Notepad, and it is different from the .txt file? Doesn't seem very likely; am I missing something here?
    Do not make direct eye contact with me.

  7. #7
    Registered User BillBoeBaggins's Avatar
    Join Date
    Oct 2003
    Posts
    107
    You never stated what program your doing the "Save as" in. If you are using Excel and you are losing numbers like 0 per say, make sure you convert the format to TEXT so the Program (Excel in this instance) knows to put qoutes around it.

    CSV files are simple.
    They are rows of information like Excel; if the information is text it has quotes, if it is not then it doesn't.

    Secondly you never mentioned what program you are trying to open up the CSV in. Because if you use Jacks Cracked Excel he might of screwed up on his import proc...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Beginner C programmer - My CSV reader
    By spadez in forum C Programming
    Replies: 6
    Last Post: 04-04-2009, 09:46 PM
  2. read in csv file
    By gums in forum C Programming
    Replies: 5
    Last Post: 05-10-2007, 08:38 AM
  3. DBF to CSV in c#
    By TheMajorRager in forum C# Programming
    Replies: 0
    Last Post: 10-04-2005, 12:23 PM
  4. how to read csv file ?
    By kosong in forum C Programming
    Replies: 5
    Last Post: 11-13-2003, 08:14 PM
  5. hexdump issues
    By daluu in forum C Programming
    Replies: 2
    Last Post: 03-04-2003, 09:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21