Results 1 to 3 of 3
  1. #1
    blandow is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    2

    Exporting to Text File

    Hello,

    I imported an excel spreadsheet which is also now a linked table.

    All the data looks great, but now I need to export to a text file, fixed width, and it is not formatting the fields the way that they appear in excel or access. Here is what it should look like:


    field 1:



    2565350


    field 2:

    83322015524990

    Here is what ends up on the text file

    field 1:
    2565350.00


    field 2:
    3.8332201552499e+14


    I have reformatted the cells in Excel every which way I can think of, but it always comes out like this.....There is actually a 3rd field which shows data such as: 42.33 and it comes out just fine formatted as text......Help?

  2. #2
    trb5016 is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Dec 2009
    Location
    Pennsylvania
    Posts
    71
    First off, two questions. What type of data fields are these values being stored as? Also, Is that a typo for the two Field 2s?

    (83322015524990 changes to 3.8332201552499e+14)

    If it's not a type I have no idea where that extra 3 is coming from, but I would venture it has something to do with a weird data type conversion *shrug*

    Anyways!

    I'd look in to the Round() and Format(). If your numbers are actually whole numbers don't worry about round.

    Try something like

    Code:
    'This says to display only numbers to the left of the decimal place
    strOutput = Format([Field 1], "0")

  3. #3
    blandow is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    2
    It was a typeo. Bottom line is that the numbers are just a long string and they keep going into scientific format. I will post a screenshot

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Exporting to Excel Date Stamped File
    By BED in forum Import/Export Data
    Replies: 1
    Last Post: 08-07-2010, 05:53 PM
  2. Text File Link
    By pkell658 in forum Import/Export Data
    Replies: 1
    Last Post: 03-23-2010, 04:46 PM
  3. Data from text file
    By Directlinq in forum Programming
    Replies: 1
    Last Post: 10-19-2009, 02:29 AM
  4. Exporting data to text file
    By NC_juggler in forum Import/Export Data
    Replies: 0
    Last Post: 11-21-2008, 10:51 AM
  5. exporting text produces a number
    By greend in forum Import/Export Data
    Replies: 0
    Last Post: 07-12-2006, 03:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums