Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Highlighted
Partner
Partner

Store as text in Qlik sense

Hi All,

 

I am not able store a table as text in qlik sense. Can anyone guide me on this. 

 

I need to store a table into a text or excel file from the script in Qlik sense.

 

Thanks

1 Solution

Accepted Solutions
mato32188
Contributor III

Re: Store as text in Qlik sense

Hi Elakkians,

table:
load * Inline [
Sales
1000000
120345
];


store table into [lib://your desired folder\table.txt](txt);

Then load txt file in Excel.

BR

Martin

2 Replies
mato32188
Contributor III

Re: Store as text in Qlik sense

Hi Elakkians,

table:
load * Inline [
Sales
1000000
120345
];


store table into [lib://your desired folder\table.txt](txt);

Then load txt file in Excel.

BR

Martin

Partner
Partner

Re: Store as text in Qlik sense

Hi,

You can also use this:

 

Store [tablename] into [path\KPIExport.csv] (txt);

 

then use a macro to convert:

Sub LoadFlatFile()

'    Workbooks.OpenText Filename:= _

        "path\KPIExport.csv", Origin _

        :=65001, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _

        xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, _

        Comma:=True, Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), _

        Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1), Array(8, 1), _

        Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1)), _

        TrailingMinusNumbers:=True

  

    Range("A1").Select

    Call ...

End Sub

 

Embed the macro in a spreadsheet and use run-on-open, but you could alternatively place the macro in the QV script.

@martynlloyd 

Jordy

Climber

Work smarter, not harder