cancel
Showing results for 
Search instead for 
Did you mean: 

Save .xls file as a .txt ( Tab delimited ) format

HarishPasham
Level 3
Hello, I have one .xls file and i want save that Excelsheet as a .txt ( tab delimited ) format. How to do that ? Quick help is appreciated. Thanks
2 REPLIES 2

RickMartin
Level 3
this worked for me: Imports Microsoft.Office.Interop.Excel Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim excelApplication As New Application Dim excelWrkBook As Workbook Try excelApplication.DisplayAlerts = False excelWrkBook = excelApplication.Workbooks.Open(""c:\TestFolder\MAIN_Total.xlsx"") excelWrkBook.SaveAs(Filename:=""c:\TestFolder\MAIN_Total.txt"", FileFormat:=Microsoft.Office.Interop.Excel.XlFileFormat.xlTextMSDOS) excelWrkBook.Close() excelApplication.DisplayAlerts = False excelApplication.Quit() Catch ex As Exception Throw ex

RickMartin
Level 3
this worked for me: Imports Microsoft.Office.Interop.Excel Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim excelApplication As New Application Dim excelWrkBook As Workbook Try excelApplication.DisplayAlerts = False excelWrkBook = excelApplication.Workbooks.Open(""c:\TestFolder\MAIN_Total.xlsx"") excelWrkBook.SaveAs(Filename:=""c:\TestFolder\MAIN_Total.txt"", FileFormat:=Microsoft.Office.Interop.Excel.XlFileFormat.xlTextMSDOS) excelWrkBook.Close() excelApplication.DisplayAlerts = False excelApplication.Quit() Catch ex As Exception Throw ex