Results 1 to 2 of 2
  1. #1
    rndmxy2k13 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2013
    Posts
    8

    Import of a .WRI-file

    Hello everybody,

    for my current project I need to import a .WRI-file using "DoCmd.TransferSpreadsheet".
    The file itself is plain text and created by an external software so there is no way I can change the format.
    Up to now I manually imported the file into Excel and then imported that file into Access using the mentioned method.

    Is it possible to


    a) directly import the .WRI-file into Access or
    b) create a makro that would automatically import the .WRI-file into Excel and then Access afterwards?

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Make a copy of the file and save it locally.

    Change your folder settings on your PC to view "Known File Extensions"

    On your copied file's name, change the extension to .txt

    Open your file.

    If it opens using your text editor (Notepad) then study the format. Is it fixed width or delimited? Are there commas or large spaces between fields?

    If all of this looks good so far then, you need to have your computer automate a file save as and convert your file to .txt. Command line can accomplish this and there are ways via VBA.

    Once you have the file type you need you can use the wizard to import and save the macro to be called later in VBA

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

Similar Threads

  1. Import Excel file based on a date and time in file name
    By nhylan in forum Import/Export Data
    Replies: 4
    Last Post: 04-16-2013, 03:26 PM
  2. Trying to import a CSV file
    By itm in forum Access
    Replies: 1
    Last Post: 04-13-2012, 06:00 PM
  3. Import Row 1 Only on a .txt File
    By newbie in forum Import/Export Data
    Replies: 2
    Last Post: 02-08-2011, 08:23 AM
  4. Import prn file
    By Accessshelp@work in forum Import/Export Data
    Replies: 1
    Last Post: 10-29-2009, 09:16 AM
  5. Import a .sql file?
    By Alan in forum Import/Export Data
    Replies: 1
    Last Post: 06-03-2009, 07:52 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