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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
elakkians
Partner - Contributor III
Partner - Contributor III

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
Specialist
Specialist

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

ECG line chart is the most important visualization in your life.

View solution in original post

2 Replies
mato32188
Specialist
Specialist

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

ECG line chart is the most important visualization in your life.
JordyWegman
Partner - Master
Partner - Master

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