title: How to import data from Excel file to Teradata table using BTEQ scripts?
body: <p>I was able to do fill tables with data from Excel file or text files using GUI utility Teradata Sql assistant. But now I have a requirement to import data into teradata tables from excel file using a bteq script. I have been trying to do that using 
  <p>.IMPORT REPORT <P>.IMPORT DATA <P>.IMPORT VARTEXT and I have tried other things also, but of no use. I have referred to some answers in teradataforum and googled for the same but my script is not working. Please help me with a script which will import data from excel file or atleast text file using BTEQ script.My script is as follows...
  <p></p>
  
  <pre><code>.LOGON XXXX/XXXXXX,XXXX
  .import data FILE = D:\XX\XXXX.xls ;
  .QUIET ON 
  .REPEAT * 
  USING COL1  (CHAR(1))
       ,COL2  (CHAR(1))
       ,COL3 (VARCHAR(100))
  
  INSERT INTO DATABASE.TABLE
      ( COL1
       ,COL2
       ,COL3)
  VALUES ( :COL1
          ,:COL2
          ,:COL3);
  .QUIT
  </code></pre>
  
  <p><p><strong>EDIT:</strong>
  <p>Till now I came this long. I have successfully loaded data from comma separated text file using the following code. But how to do it in Excel?</p>
  
  <pre><code>.LOGON xxxx/xxxx,xxxx
  .IMPORT VARTEXT ',' FILE=xxxxx.TXT;
  .QUIET ON 
  .REPEAT * 
  USING 
  (   col1 VARCHAR(2)
      ,col2 VARCHAR(1)
      ,col3 VARCHAR(60)
  )        
  INSERT INTO database.table
      ( col1
       ,col2
       ,col3)
  VALUES ( :col1
      ,:col2
      ,:col3);
  .QUIT
  </code></pre>
  
  <p>Sample comma separated text file being</p>
  
  <pre><code>1,B,status1
  2,B,status2
  3,B,status3
  </code></pre>
  
  <hr>
  
  <p>etc.<br>
  Please help me if possible to load the same with Excel file.</p>