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: 
prees959
Creator II
Creator II

Transpose a table into a single line text file

Hi,

 

I need to export a table into a single line text file to then post to an API on a different platform.  

 

If I have a table eg

ID, Value

1,345546

2,433245

3,434645

4,546456

5,234235

I then need to transpose it into a single line and export it, as a text file, in the following format 

 

{"1": "345546","2": "433245","3": "434645","4": "546456","5": "234235"}

Is this possible?

 

Many thanks,

 

Phil

Labels (1)
1 Solution

Accepted Solutions
bharathadde
Creator II
Creator II

Create a text box and insert the below expression

='{' & Concat('"' & ID & '"'& ';' & '"' & Value & '"' ,',') & '}'

after that export it to Excel (Since there is no way you can export it to text file in qlikview unless you use macros)

View solution in original post

1 Reply
bharathadde
Creator II
Creator II

Create a text box and insert the below expression

='{' & Concat('"' & ID & '"'& ';' & '"' & Value & '"' ,',') & '}'

after that export it to Excel (Since there is no way you can export it to text file in qlikview unless you use macros)