Converting an Excel file to Tab Delimited Format

This code will convert an Excel file to tab delimited format, using the Excel object model (which will require Excel to be installed where this code is run!).

Dim lobjExcel As Object  ' Instance Of The Excel Application Object
Dim lobjWorkBook As Object         'Instance For WorkBook Collection
Set lobjExcel = server.CreateObject("Excel.Application")
Set lobjWorkBook = lobjExcel.Workbooks.Open(Filename with the path)
lobjExcel.DisplayAlerts = False
'Saving In The Tab Delimited Format
lobjWorkBook.SaveAs lstrFilePath, -4158
Set lobjWorkBook = Nothing
'DesTroying The Excel Object
lobjExcel = Nothing

You might also like...


Vipin Mohandas


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“We better hurry up and start coding, there are going to be a lot of bugs to fix.”