+ Reply to Thread
Results 1 to 13 of 13

Import Textfile WITHOUT showing wizard..

  1. #1
    Forum Contributor
    Join Date
    03-24-2009
    Location
    Vietnam
    MS-Off Ver
    Excel 2010
    Posts
    382

    Import Textfile WITHOUT showing wizard..

    Hello!

    I am using this code to import txt documents, but once the file has been selected and everything, the excel data import wizard shows up... I now would like to get rid of this problem, as well add a standard path to this code, so that I dont always have to start from the desktop and click through tons of folders to get the folder containing my files.

    Please Login or Register  to view this content.
    btw, all the files are delimited and saved in folder C:/testfolder/ . However, I dont want to import all files of this folder, only the one which has been selected.

    Thanks for the help!!
    A2k
    Last edited by Armitage2k; 09-18-2009 at 06:00 AM.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Import Textfile WITHOUT showing wizard..

    I don't know if it's of use to you, but drag and dropping a text file in a XL sheet does the job without wakening the wizard

  3. #3
    Forum Contributor
    Join Date
    03-24-2009
    Location
    Vietnam
    MS-Off Ver
    Excel 2010
    Posts
    382

    Re: Import Textfile WITHOUT showing wizard..

    I am afraid that is not a suitable solution, since this will not be performed by myself, and the insert data later will be adjusted by another macro and must be in certain cells from A2 downwards.

    But thanks,
    A2k

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Import Textfile WITHOUT showing wizard..

    ArmitageK2

    try....
    Please Login or Register  to view this content.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  5. #5
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Import Textfile WITHOUT showing wizard..

    or maybe ...
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    03-24-2009
    Location
    Vietnam
    MS-Off Ver
    Excel 2010
    Posts
    382

    Re: Import Textfile WITHOUT showing wizard..

    well, thanks for the help, but unfortunately both codes dont do what I need to do

    The data in the txt files is delimited. Both codes copy me the whole data into one cell per row, thus the "tab" separating the data is ignored.
    Further, the data must be entered in A2 onwards, since row 1 contains headers and some infos I need. Afar from this, the import works fine, just not exactly how I need it

    Thanks,
    A2k

  7. #7
    Forum Contributor
    Join Date
    03-24-2009
    Location
    Vietnam
    MS-Off Ver
    Excel 2010
    Posts
    382

    Re: Import Textfile WITHOUT showing wizard..

    well, much easier:
    Please Login or Register  to view this content.
    Still one more little adjustment though. How can I add a standard path to this macro? I tried to set another variable and add it to "filetoopen" but it simply ignores me somehow... any ideas?

    thanks,
    A2k
    Last edited by Armitage2k; 09-15-2009 at 12:44 PM.

  8. #8
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Import Textfile WITHOUT showing wizard..

    Hi AK2

    What the delimiter Tab?

  9. #9
    Forum Contributor
    Join Date
    03-24-2009
    Location
    Vietnam
    MS-Off Ver
    Excel 2010
    Posts
    382

    Re: Import Textfile WITHOUT showing wizard..

    yes.
    However, the above posted code works for me, only a possiblity to add a standard path would be on my wishlist

    Thanks,
    A2k

  10. #10
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Import Textfile WITHOUT showing wizard..

    A2k
    Try..
    Please Login or Register  to view this content.

  11. #11
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Import Textfile WITHOUT showing wizard..

    A2K can you please mark the post "solved" if it has been resolved

  12. #12
    Forum Contributor
    Join Date
    03-24-2009
    Location
    Vietnam
    MS-Off Ver
    Excel 2010
    Posts
    382

    Re: Import Textfile WITHOUT showing wizard..

    Works like a charm now!
    Thanks a lot!!
    A2k

  13. #13
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Import Textfile WITHOUT showing wizard..

    your welcome
    thanks for marking the post

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1