Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Apr 2002
    Location
    Nottingham, Nottinghamshire, England
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Importing a UNIX csv file (Access 97 sr2)

    We had an Excel application that imported a UNIX csv file, jiggled around with it and saved the spreadsheet. A separate Access application then did an importspreadsheet from the xls file, pulled in the data and did it's thing. Both of these applications were killed off at the same time and everyone was happy...

    Now though they want to resurrect the Access bit, but bypassing the Excel bit. However, when ever I try to import the csv file I get an overflow message. I can open the file with PFE, uncheck the UNIX format box and Access is happy. Anyone know how to import the file?

    The only option that I know of is to open the file for input and read the line into a string (being a UNIX file the line is in fact the entire file, hence the problem), split out the rows manually and either break down the columns or save to another file and input that.

    The file I've added(renamed .txt from .csv) is one that I've created to simulate the problem, I'm not willing to post the original for legal reasons, but it's 10x the size.

  2. #2
    Star Lounger
    Join Date
    Apr 2002
    Location
    Nottingham, Nottinghamshire, England
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Importing a UNIX csv file (Access 97 sr2)

    try again with the file...
    Attached Files Attached Files

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Importing a UNIX csv file (Access 97 sr2)

    The easiest way is to open the file in Word or Excel and then save it from there as text file. This will replace the carriage returns with carriage return/line feed pairs, so that Access will be happy.
    This can be automated by opening a Word or Excel application object in Access.

  4. #4
    Star Lounger
    Join Date
    Apr 2002
    Location
    Nottingham, Nottinghamshire, England
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Importing a UNIX csv file (Access 97 sr2)

    Cheers Hans,
    I hadn't considered Word for the job.
    I had considered Excel, but one of the fields has an identifying string which sometimes has a leading 0, Excel (knowing best) kindly trims the leading 0's

    Alan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •