Exporting data into a pre-formatted file

后端 未结 3 1066
醉酒成梦
醉酒成梦 2020-12-22 00:47

I am using Access 2007 and I wish to export my data into a text file with a \'.\' separator. I don\'t seem to have any luck finding an answer so I wondering if it were possi

相关标签:
3条回答
  • 2020-12-22 01:27

    here's one way of doing it (reposted from my original answer to the duplicated question):

    1. select the table/query you want to export on the navigation pane
    2. right-click your table/query and select "Export" > "Text File" (or click the "Text File" button on the "Export" section of the "External Data" tab of the ribbon.
    3. choose a location to save the text file and click the "OK" button
    4. on the next screen of the wizard dialog box, select "Delimited" and click the "Next" button
    5. choose "Other" as your delimiter and type a dot into the box next to it
    6. choose a text qualifier from the dropdown if you want text fields to be quoted in your output
    7. check the "Include Field Names on First Row" box if you like
    8. click the "Advanced" button for more options
    9. change the "Decimal Symbol" option to something other than a dot. (this is necessary because your output field delimiter cannot match your decimal symbol or else the export operation will fail.)
    10. click the "OK" button
    11. click the "Finish" button

    that should handle it. i'm assuming that there are no decimal numbers or dots in any of your text fields, or else you'll have problems parsing the output...

    0 讨论(0)
  • 2020-12-22 01:31

    Right click ---> Export ----> Text File ----> pick location (don't check export data with frmatting and layout ----> OK ----> delimited, ok ---> next-----> other "."

    0 讨论(0)
  • 2020-12-22 01:34

    Working with a schema.ini file

    In MS Access

     Sub TransferData()
        'Assuming file exits
        Kill "z:\docs\export.txt"
        CurrentDb.Execute "select * into [text;database=z:\docs\].[export.txt] from table1"
     End Sub
    

    The Schema.ini file, which must be in the directory that is used for the export:

    [export.txt]
    Format=Delimited(.)
    DecimalSymbol=,
    

    More information: Schema.ini

    0 讨论(0)
提交回复
热议问题