1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Comma delimited ascii files

Discussion in 'Business Applications' started by Faerious, Aug 14, 2007.

Thread Status:
Not open for further replies.
Advertisement
  1. Faerious

    Faerious Thread Starter

    Joined:
    Aug 14, 2007
    Messages:
    5
    I need to export data from excel into comma delimited text (ascii) file so that i can import it into another program. I've never done this before but here's what I did... I saved the excel file as a csv, opened the csv with wordpad and did a 'save as' from there to get the .txt extension. The data in the text file appears to be in the exact format I need
    (0, "Text", 1, 3, 0) but the program I am trying to import it into doesn't like it ('invalid record' or something like that). Did I do something wrong in the process of arriving at my .txt file?
     
  2. jimr381

    jimr381

    Joined:
    Jul 20, 2007
    Messages:
    4,189
    First Name:
    Jim
    There are two CSV formats. One for dos one for windows. I have not heard of any issues with either or, but the program might be picky. Try exporting as the other file type. There is also a file type that actually ends in .csv and that might be what it is wanting as well.
     
  3. kiwiguy

    kiwiguy

    Joined:
    Aug 17, 2003
    Messages:
    17,584
    The recipient program may not like the " (quotes) around the text.

    You may need to use Wordpad or similar and do a global find and replace (replace with nothing).
     
  4. ChuckE

    ChuckE

    Joined:
    Aug 30, 2004
    Messages:
    2,311
    I am assuming that the other program is actually another spreadsheet program. What are you trying to get this data into? what application?

    If it isn't a spreadsheet program, then what I'm about to say may not be correct.

    You are working too hard. When you save the data as a CSV file (Comma Separated Values) which should then have a ".CSV" at the end of the filename, that is all you needed to have. There was no need to open it in Notepad, or any other text editor, or to change the filename extension.

    .CSV files are understood to be what you want, for any program that uses CSV files.

    Just, again, export (actually just save it as) a .CSV file, then open that file in your other (spreadsheet?) program.
     
  5. Ziggy1

    Ziggy1

    Joined:
    Jun 17, 2002
    Messages:
    2,551
    Also try to Export (if possible) from that program so you can confirm the layout you are trying to Import
     
  6. Faerious

    Faerious Thread Starter

    Joined:
    Aug 14, 2007
    Messages:
    5
    Thanks all for your help. I exported the data out of the program, which runs on access databases, to copy the layout. The quotes are good but the program I'm importing into says that I have an "invalid record", even though I have copied a portion of an export from another existing database in the program. Is it possible that the program I'm trying to import into needs any imported data to be tagged differently in my import file? Again, the program I'm working with runs on Access databases.
     
  7. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    Have you got Access?
     
  8. jimr381

    jimr381

    Joined:
    Jul 20, 2007
    Messages:
    4,189
    First Name:
    Jim
    Access should import any standard CSV file. What is it using as a record separator? It should be recognizing "Enter" as the record separator.

    Also Access will import Excel files with no issue as well. Try going to "File">>"Get External Date">>"Import".
     
  9. Faerious

    Faerious Thread Starter

    Joined:
    Aug 14, 2007
    Messages:
    5
    I'm not very Access savvy but shouldn't I be seeing a table that corresponds to the data I'm trying to import? For example, the data I'm trying to import has the following format:
    Record Type (int), MagicString (string), MajorNumber (int), MinorNumber (int), SortBy (int)
    Am I mistaken or should there be a table in Access that reflects these values as named (Record Type, MagicString, etc.)?
     
  10. jimr381

    jimr381

    Joined:
    Jul 20, 2007
    Messages:
    4,189
    First Name:
    Jim
    I thought you were trying to import into Access from Excel? If you follow the steps I have provided in the previous post it will walk you through importing the data via a wizard. That is if they have not customized the menu bars.
     
  11. Faerious

    Faerious Thread Starter

    Joined:
    Aug 14, 2007
    Messages:
    5
    I tried importing within Access and went through the wizard thing just like you outlined but when it asked me what table I wanted to import it into I was confused because none of the tables had data columns in it that corresponded to the data I have.
    This is such an old-school way of doing it. I used to have software that did this for me, long story short, it is no longer functional and I have no one to support it. As much as I'd like to attach an mdb file for someone to look at, I can't due to security issues; I work in elections. Let me know if you have any other ideas. In the meantime I'll be trying to think outside the box to make this happen. Thanks!
     
  12. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    Faerious, when importing choose the "New Table Option".
    If you can post an example of the data, it doesn't have to be real, I can knock you up an import routine.
    Do you want to Append the data to a table each time that you import it, or is this just a one off import?
     
  13. ChuckE

    ChuckE

    Joined:
    Aug 30, 2004
    Messages:
    2,311
    With an "invalid record" type of error message, it is possible that the last record (every line is a record in a CSV file) is not ending with a (hex) 0x0D 0x0A (a "Return") pair.

    Or perhaps even one or more of the lines (records) is not ended with that same pair of bytes.

    Or perhaps the very end of the file is ended with a Ctrl-Z (0x1A) which may have happened if you opened and saved the file with a text editor.
     
  14. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/609790

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice