Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

mellerbeck
Contributor II

How to export the text of a variable

I've been able to export an object to xml using

set oTable = ActiveDocument.GetSheetObject( "Note_Export" )

oTable.ExportXml "\\RemotePath\Test\" + sFileName

It looks like I can get the text of a variable by doing

set Var = ActiveDocument.Variables("Note").GetContent.String

But how to save this to a file?



Tags (1)
1 Solution

Accepted Solutions

Re: How to export the text of a variable

Hi Michael,

There is no direct QV API call to write variable values to a file. You can use the FileSytemObject to write the date. For example, see DocAnalyzer. However, this requires System Access.

As an alternative, you can put the variable in a chart as an expression and export the chart. No System Access required. See attached. Test it out, I got some funny results when I used a multi-line note. Any of the various Export API methods, Export, ExportEx with format, ExprtHtml should work

-Rob

4 Replies
mellerbeck
Contributor II

Re: How to export the text of a variable

This is from a macro that is called from a button

Re: How to export the text of a variable

Hi Michael,

There is no direct QV API call to write variable values to a file. You can use the FileSytemObject to write the date. For example, see DocAnalyzer. However, this requires System Access.

As an alternative, you can put the variable in a chart as an expression and export the chart. No System Access required. See attached. Test it out, I got some funny results when I used a multi-line note. Any of the various Export API methods, Export, ExportEx with format, ExprtHtml should work

-Rob

mellerbeck
Contributor II

Re: How to export the text of a variable

Thanks Rob! So I'm trying to find a good way to record permanant 'Notes' into a DB. If I use a table box with an inputfield or a ListBox it won't line wrap during text entry (after hitting enter it line wraps just fine) so my reasoning was I could use an input box and have them press the edit expression and allow them to do a multi line note. It Doesn't seem like there is a super easy way to do this though.

Re: How to export the text of a variable