saving a .xlsx as a tab delimited text file

Sonican

New Member
Joined
Jun 20, 2016
Messages
13
I have a spreadsheet that I need to convert into a tab delimited text file.
I am writing some vbs code in notepad++ and I just cant get the last line to work, everything else runs perfect, but I just cant get it to save as a tab delimited text file :/

Code:
Set ExcelObject = CreateObject("Excel.Application")ExcelObject.visible = True
ExcelObject.Workbooks.Open"c:\testingblank.xlsx",Default, False
ExcelObject.sheets(1).Rows("1:2").Delete
ExcelObject.Sheets(1).Cells(1,1).value = "testing write function"
ExcelObject.Activeworkbook.SaveAs Filename="C:\output.txt", FileFormat=xl _

The only line that i cant get to work is this

Code:
ExcelObject.Activeworkbook.SaveAs Filename="C:\output.txt", FileFormat=xl _

I'm not getting an error message or anything, but instead the code is randomly making another file called "FALSE.xls" and its driving me insane.:ROFLMAO::ROFLMAO:
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Forum statistics

Threads
1,215,200
Messages
6,123,598
Members
449,109
Latest member
Sebas8956

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top