First of all, I'm quite amateur on VBA that why i need your help!
I use the code below to convert .xlsx
to .csv
but somehow the character is not good to see.English is ok but Vietnamese character is not easy to see.
For example, copy this text" Bạn đánh giá về nhà hàng của chúng tôi hôm nay như thế nào?" to xlsx file and use code below to convert to csv. Then the character is shown like this "Ba?n ?a?nh gia? vê? nha? ha?ng cu?a chu?ng to?i ho?m nay nhu? thê? na?o?"
Anyone can help me with this! thank you in advance
Dim fso: set fso = CreateObject("Scripting.FileSystemObject") ' directory in which this script is currently running CurrentDirectory = fso.GetAbsolutePathName(".")
Set folder = fso.GetFolder(CurrentDirectory)
For each file In folder.Files
If fso.GetExtensionName(file) = "xlsx" Then
pathOut = fso.BuildPath(CurrentDirectory, fso.GetBaseName(file)+".csv")
Dim oExcel
Set oExcel = CreateObject("Excel.Application")
Dim oBook
Set oBook = oExcel.Workbooks.Open(file)
oBook.SaveAs pathOut, 6
oBook.Close False
oExcel.Quit
End If Next