How do you save Excel as a .dat file? I tried both of the following methods:
METHOD ONE (does not pick up all the columns)
Application.CutCopyMode = False
With ActiveWorkbook.Styles("Normal"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
.IncludeNumber = False
.IncludeFont = True
.IncludeAlignment = False
.IncludeBorder = False
.IncludePatterns = False
.IncludeProtection = False
End With
With ActiveWorkbook.Styles("Normal"
.Font
.NAME = "Courier New"
.Size = 10
.Bold = False
.Italic = False
.Underline = xlUnderlineStyleNone
.Strikethrough = False
.ColorIndex = xlAutomatic
End With FileFormat:= _
xlText, CreateBackup:=True
METHOD 2 (DOES NOT SAVE FORMATTING)
Open "Flatfile" & Application.Text(Now(), "mmdd"
& ".dat" For Output As #1
LASTROW = Application.CountA(ActiveSheet.Range("A:A"
)
All help is appreciated.
METHOD ONE (does not pick up all the columns)
Application.CutCopyMode = False
With ActiveWorkbook.Styles("Normal"
.IncludeNumber = False
.IncludeFont = True
.IncludeAlignment = False
.IncludeBorder = False
.IncludePatterns = False
.IncludeProtection = False
End With
With ActiveWorkbook.Styles("Normal"
.NAME = "Courier New"
.Size = 10
.Bold = False
.Italic = False
.Underline = xlUnderlineStyleNone
.Strikethrough = False
.ColorIndex = xlAutomatic
End With FileFormat:= _
xlText, CreateBackup:=True
METHOD 2 (DOES NOT SAVE FORMATTING)
Open "Flatfile" & Application.Text(Now(), "mmdd"
LASTROW = Application.CountA(ActiveSheet.Range("A:A"
All help is appreciated.