Saving Excel worksheet into text not formatting correctly

rmobley232

New Member
Joined
Jun 30, 2016
Messages
15
I am pulling data into Excel through an ODBC code using SQL code:
SELECT CONCAT (a.Material,',',c.New_Pattern) as RP_Unassign FROM Weekly.Assign;

The data pulled into Excel is formatted exactly as it needs to be:
RP_Unassign
30UN96,GUSSUP202011
36UN72,GUSREG202011

Once the data has been updated on a weekly basis, I save this tab as tab delimited .txt for final execution. When I do, it places quotations around my data, which I can't have, is there something with the CONCAT code creating these quotations when I save as a text file?
RP_Unassign
"30UN96,GUSSUP202011"
"36UN72,GUSREG202011"
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Here is the code, I have modified it to save it with the date I run the code (for example if I saved it today would have the format 051221:
ActiveWorkbook.SaveAs Filename:= _
"C:\Users\br4rkm\OneDrive - W.W Grainger, inc\Desktop\Region Pattern Unassign " & Format(Now(), "mmddyy") & ".txt" _
, FileFormat:=xlText, CreateBackup:=False
 
Upvote 0
Try FileFormat:=xlTextPrinter instead of FileFormat:=xlText

also

If you are using 'write' in your vba code, change those to 'Print"
 
Upvote 0

Forum statistics

Threads
1,214,817
Messages
6,121,717
Members
449,050
Latest member
MiguekHeka

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