I have some data in Excel file and I need to share it with somebody. The other side has specific requirements to the format: text file, *.dat name, pipe-separated, etc..
So I created a VBA-code to extract the data into a text file using the examples from this site.
At the moment my file is not being accepted because: "It's not a UTF-8 UNIX format". I tried multiple solutions from the internet but each time I receive an answer that it's either "UTF-8 PC format" or "Unicode format".
Can somebody help me to solve this? Here's what I have so far:
'create output (this is from my initial version)
Set Fileout = fso.CreateTextFile(myFile, True, True)
For y = 2 To a
Fileout.WriteLine .Cells(y, 59)
Next y
Fileout.Close
'this is from my second conversion attempt, where I received UTF-8 PC format
Set stream = CreateObject("ADODB.Stream")
stream.Open
stream.Position = 0
stream.Charset = "UTF-8"
stream.LoadFromFile myFile
'This is my latest try. I found something called "UTF-8 without BOM" on the internet. Still doesn't work.
Set StreamUnixUtf = CreateObject("ADODB.Stream")
StreamUnixUtf.Type = 1
StreamUnixUtf.Mode = 3
StreamUnixUtf.Open
stream.Position = 3
stream.CopyTo StreamUnixUtf
stream.Flush
stream.Close
StreamUnixUtf.SaveToFile myFileUnixUTF, 2
StreamUnixUtf.Close
Thank you in advance for your help.