I have a Visual basic application which creates a excel spreadsheet and is saved as a .txt file.
ActiveWorkbook.SaveAs Filename:="c:\temp\file.txt", FileFormat:= _
xlTextPrinter, CreateBackup:=True
Before the save I have something like this
Columns("A:O".Columns.AutoFit
if I use the autofit it truncates some of the column fields which should not happen.
Now if I take away the autofit before the save, all the columns have the required length. The problem is it wraps the last column.
for example if there are 50 rows with 10 columns, it displays 50 rows with columns 1 to 9 and then 50 rows of the 10nth column below it. so a total of 100 rows. Any one know how to get the 10nth column along with the other columns and columns not being truncated.
Thanks
ActiveWorkbook.SaveAs Filename:="c:\temp\file.txt", FileFormat:= _
xlTextPrinter, CreateBackup:=True
Before the save I have something like this
Columns("A:O".Columns.AutoFit
if I use the autofit it truncates some of the column fields which should not happen.
Now if I take away the autofit before the save, all the columns have the required length. The problem is it wraps the last column.
for example if there are 50 rows with 10 columns, it displays 50 rows with columns 1 to 9 and then 50 rows of the 10nth column below it. so a total of 100 rows. Any one know how to get the 10nth column along with the other columns and columns not being truncated.
Thanks