Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Byte order mark

HELLO EVERYONE,

Below line puts BOM  to text file, is there any way to skip while writing to a text file?

Store sampletable into C:\Qlikview\buildsql.txt (txt);

Thanks & Regards

1 Solution

Accepted Solutions
Not applicable
Author

Hello Everyone,

I found a way to achive,  read the text and search for the special character with ascii value and trim. Below is the script that i have used. Hope this might help other, Hence sharing

set FSO= createobject("Scripting.FilesystemObject")
set openReconFile=FSO.OpenTextFile("C:\Qlikview\buildsql.txt")
scriptBackup= openReconFile.ReadAll

openReconFile.Close

If (Len(Trim(scriptBackup)) > 0) Then
Dim AscValue : AscValue = Asc(Trim(scriptBackup))
If ((AscValue = -15441) Or (AscValue = 239)) Then
scriptBackup = Mid(Trim(scriptBackup),4) :
End If
End If

View solution in original post

1 Reply
Not applicable
Author

Hello Everyone,

I found a way to achive,  read the text and search for the special character with ascii value and trim. Below is the script that i have used. Hope this might help other, Hence sharing

set FSO= createobject("Scripting.FilesystemObject")
set openReconFile=FSO.OpenTextFile("C:\Qlikview\buildsql.txt")
scriptBackup= openReconFile.ReadAll

openReconFile.Close

If (Len(Trim(scriptBackup)) > 0) Then
Dim AscValue : AscValue = Asc(Trim(scriptBackup))
If ((AscValue = -15441) Or (AscValue = 239)) Then
scriptBackup = Mid(Trim(scriptBackup),4) :
End If
End If