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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
amien
Specialist
Specialist

ExportBiff as ReadOnly file

is this possible? i dont see any options like true,false like VB.NET has. Manual is not clear about this.

1 Reply
Anonymous
Not applicable

I guess you could export the file and then run a check on the read-only state of the file. Here's a snippet of vbscript I found online:

' ------ SCRIPT CONFIGURATION ------
strFile = "<FilePath>" ' e.g. d:\mysecretscript.vbs
boolReadOnly = True ' True = read-only, False = not read-only
' ------ END CONFIGURATION ---------
set objFSO = CreateObject("Scripting.FileSystemObject")

' Change this to GetFolder to hide/unhide a folder
set objFile = objFSO.GetFile(strFile)

if boolReadOnly = True then
if objFile.Attributes AND 1 then
WScript.Echo "File already read-only"
else
objFile.Attributes = objFile.Attributes + 1
WScript.Echo "File is now read-only"
end if
else
if objFile.Attributes AND 1 then
objFile.Attributes = objFile.Attributes - 1
WScript.Echo "File is not read-only"
else
WScript.Echo "File is already not read-only"
end if
end if