Importing data from text file to excel sheets RRS feed

  • Question

  • Hi, I had a task for importing text from text file to excel sheet using VB Script, is it possible or are there any tools to get the thing done.

    • Moved by Jeff Shan Monday, March 1, 2010 7:19 AM vb script question (From:Visual Basic General)
    Thursday, February 25, 2010 10:33 PM

All replies

  • Hi Everyone, 
    What should be the process (or) script to copy text from text file to excel sheet, by each word into one block in excel sheet? 

    THnkz In Advance
    • Merged by Jeff Shan Monday, March 1, 2010 2:16 AM Merge it to keep the same topic in one thread
    Thursday, February 25, 2010 8:41 PM
  • You probably don't need a process or script.  If the text file is in fixed width (column) format, or it consists of values separated by a common character such as comma ot tab then no code is needed to import the text files into Excel.  In your case it sounds like the data in the file is separated by spaces.
    Thursday, February 25, 2010 10:59 PM
  • That depends on the format of the file.  If it is fixed-width data (laid out in columns of the same width) or if the data values are separated by a specific character such as a tab then you can import it directly into Excel without using code.
    Thursday, February 25, 2010 11:00 PM
  • It can probably be done with ADO (probably easily if the text file is delimited) but you need to post your question to a VBScript forum:

    Paul ~~~~ Microsoft MVP (Visual Basic)
    Friday, February 26, 2010 3:14 AM