title: Exception converting xls file to tab-delimited file
body: <p>I have couple of ".xls" files on a folder and need to convert it into tab seperated values
  Found a vb script for this ..please some body sugest how to do this?
  I am getting couple of error when running this.I am not a vb programmer.Experts...please help</p>
  
  <pre><code>Public Sub Main()
      Dim WScript As Object = Nothing   '' with out nothing it was showing an error
      Dim oExcel As Object
      Dim oBook As Object
  
     If WScript.Arguments.Count &lt; 2 Then
        WScript.Echo("Error! Please specify the source path and the destination. Usage: XlsToCsv SourcePath.xls Destination.csv")
        Wscript.Quit()
     End If
     oExcel = CreateObject("Excel.Application")
     oBook = oExcel.Workbooks.Open(WScript.Arguments.Item(0))  ''item o might be excel
     oBook = oExcel.Workbooks.Open("C:\Users\5A5.xls")
     oBook.SaveAs(WScript.Arguments.Item(1), -4158)
  
     oBook.Close(False)
     oExcel.Quit()
     WScript.Echo("Done")
  
  End Sub
  </code></pre>
  
  <p>The exception:</p>
  
  <pre><code>System.Reflection.TargetInvocationException:    
     Exception has been thrown by the target of an invocation. 
       ---&gt; System.NullReferenceException: Object variable or With block variable not set.
  </code></pre>