I have implemented the below script but could not save the same as UTF-8 format.
How to save the converted CSV from Excel in UTF-8 CSV format using VBScript?
Dim strExcelFileName
Dim strCSVFileName
strExcelFileName = "C:\Users\test.xlsx"
Set fso = CreateObject("Scripting.FileSystemObject")
strScript = WScript.ScriptFullName
strScriptPath = fso.GetAbsolutePathName(strScript & "\..")
LPosition = InStrRev(strExcelFileName, "\")
If LPosition = 0 Then
strExcelFileName = strScriptPath & "\" & strExcelFileName
strScriptPath = strScriptPath & "\"
Else
strScriptPath = Mid(strExcelFileName, 1, LPosition)
End If
Set objXL = CreateObject("Excel.Application")
Set objWorkBook = objXL.Workbooks.Open(strExcelFileName)
objXL.DisplayAlerts = False
For Each sheet In objWorkBook.Sheets
If objXL.Application.WorksheetFunction.CountA(sheet.Cells) <> 0 Then
sheet.SaveAs strScriptPath & sheet.Name & cell & ".csv", 6 'CSV
End If
Next
objWorkBook.Close
objXL.Quit
Set objXL = Nothing
Set objWorkBook = Nothing
Set fso = Nothing