Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm developing a macro that allow me to export to text (.txt , word, etc.) all text inside Script Module (not hidden script, only visible) and export to image the table viewer of document (PNG, JPG, etc.)
I search on API guide and Qlik Community but I didn't found anything.
Does anybody know if it possible to do this with macro VBA? Can anybody help me?
Thanks in advance,
Daniel
The script could be automatically exported but (AFAIK) the pictures from table viewer not. See here an example from APIGuide.qvw to access the script:
rem ** add new line to script **
set docprop = ActiveDocument.GetProperties
docprop.Script = docprop.Script & "Load * from abc.csv;"
ActiveDocument.SetProperties docprop
- Marcus
Hi Daniel,
Could you clarify your idea? Why do you need it?
Regards,
Sergey
Hi Sergey,
Thanks for your answer and attention.
I'm doing a macro to develop automatic documention of a QlikView project. So, the reason that I need this is to put this information in a text document. So, my question is:
Is there any way to export the script of QlikView document and image of data model (that I see in table viewer)? (with a function or another idea). I didn't find anything helpfhul in API Guide...
Thanks for your help.
Daniel
The script could be automatically exported but (AFAIK) the pictures from table viewer not. See here an example from APIGuide.qvw to access the script:
rem ** add new line to script **
set docprop = ActiveDocument.GetProperties
docprop.Script = docprop.Script & "Load * from abc.csv;"
ActiveDocument.SetProperties docprop
- Marcus
Markus gave you an example.
Just in case whether it could be helpful QlikView App Documentation
Regards,
Sergey
Thanks for your answer Marcus!
I use this code to extract all script of my QlikView document to txt file:
vRutaETL = ActiveDocument.GetVariable("vRutaETL").GetContent().String
CONST ForWriting = 2
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set ficheroTXT = objFSO.OpenTextFile (vRutaETL, ForWriting, True)
ficheroTXT.WriteLine(ActiveDocument.GetProperties.Script)
ficheroTXT.Close()
So, it's imposible to export an image of data model of my QlikView document?
Best regards,
Daniel
Thank you Sergey!
I don't know about this QlikView App Documentation. It's a good sample to learn how programar VBA in QlikView.
I believe there isn't any (documented) way to automate the export from the table viewer. The only documented access is the print settings:
set docprop = ActiveDocument.GetProperties
docprop.TableViewerPrintSettings.Landscape = true
ActiveDocument.SetProperties docprop
but maybe there is more - undocumented or there is something within the easter egg ...
- Marcus
Hi Marcus,
Could you please share any script/macro to automate 'Export Structure'(.Mappings file) in 'Internal Table View'.
Thanks,
Bakshu.
AFAIK this isn't possible.
- Marcus