Extract data from pipe "|" delimited text file to new excel workbook - worksheet.
<p>I have used the the below code for converting the data from text delimited file to excel workbook, but it stores it on the active workbook , instead of new workbook sheet.</p>

<p>I have 3 text files and i need the data of all these three text files into one new workbook, in three different sheets.</p>

<p>Code snippet below of the macro developed so far-</p>

<pre><code>Dim wkbTemp As Workbook
Dim sPath As String, sName As String
sPath = strFileToOpen

sName = "Test.txt"

Workbooks.OpenText Filename:=sPath, _
    Origin:=xlMSDOS, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
    xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False _
    , Comma:=False, Space:=False, Other:=True, OtherChar:="|"
 Set wkbTemp = xlapp.xlwkbInput
Application.ScreenUpdating = False
</code></pre>

<p>Set wkbTemp = xlapp.xlextwkbInput -  i need to get this data to new excel workbook - new sheet. for eg - sheet1 , so on and so forth for other two t files, in two other sheets.</p>