UNIX/OSX Conversion

Hi All,

Hope anyone can help me on this.

I have a data table call dtDecimal. I want to copy the data table into a text file and save it under .aSc extension. And then I need to convert the text file to UNIX/OSX format (EOL conversion).

Usually the conversion will be done with below macro code. Anyone have any idea how I can integrate below code into my WF.

Public Sub convertFile(ByVal fileName As String)
Const Dos2Unix = 1
Dim fs As Object, txt As String
Set fs = CreateObject(“Scripting.FileSystemObject”)

txt = fs.OpenTextFile(fileName, 1).ReadAll  'ForReading = 1
txt = IIf(Dos2Unix = 1, Replace(txt, vbCrLf, vbLf), Replace(txt, vbLf, vbCrLf))
fs.OpenTextFile(fileName, 2).Write txt      'ForWriting = 2

End Sub

attached the format type in Notepad++

Basically I’m trying to converting Dos Text Files to Unix