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: 
msirinaydinie
Contributor II
Contributor II

Export a number to csv or txt without any html tag

Dear community,

I'm trying to export a number to csv than I use Web Connector(FTP/sFTP Connector ) to upload this csv to the sFTP server.

When I open the csv there are a lot of code ( I guess it is HTML /Xml code) which you can see below screen shot.

I want to put only the revenue number to the csv not any code.

My code block:

------------------------------------------

Let TotalRevenue = '$(ForeCastRevenue)' + '$(AirRmRevenue)' + '$(AncillaryRevenue)' - 635000000;

sFTP:
Load '$(TotalRevenue)' as Revenue
AutoGenerate(1);

 

Store Revenue from sFTP Into [lib://FLD_CBI/BoostOurBusiness/$(vToday).txt];

 

FileTransferConnector_SFTPUploadFile:
LOAD
Status as SFTPUploadFile_Status
FROM
[https://..]
(qvx);

------------------------------------------

 

My csv output from sFTP server is below:

I just wanted to put the revenue number which I marked yellow to csv. How I can delete XML code except  -118145051,67957 (Revenue) ?

 

 

csv ss.JPG

Many thanks in advance.

Labels (1)
  • SaaS

2 Solutions

Accepted Solutions
stevejoyce
Specialist II
Specialist II

What if you do 

Store Revenue from sFTP Into [lib://FLD_CBI/BoostOurBusiness/$(vToday).txt] (txt) ;

View solution in original post

sunny_talwar

Try by adding (txt) at the end of the store statement.

Store Revenue from sFTP Into [lib://FLD_CBI/BoostOurBusiness/$(vToday).txt] (txt);

View solution in original post

8 Replies
stevejoyce
Specialist II
Specialist II

What if you do 

Store Revenue from sFTP Into [lib://FLD_CBI/BoostOurBusiness/$(vToday).txt] (txt) ;

sunny_talwar

Try by adding (txt) at the end of the store statement.

Store Revenue from sFTP Into [lib://FLD_CBI/BoostOurBusiness/$(vToday).txt] (txt);

msirinaydinie
Contributor II
Contributor II
Author

Thank you very much, Steve, it worked!

msirinaydinie
Contributor II
Contributor II
Author

Thanks a lot, Sunny.  I also learned a lot of things from your answers to other topics. 

You are the best 🙂

Have a good day.

sunny_talwar

I am glad I have been able to help you learn 🙂

msirinaydinie
Contributor II
Contributor II
Author

Sunny, I need help with one more step in this process. 

How can I delete double quotes on the number that I put into txt file.

 csv ss1.JPG

Many thanks.

 

My Code Block:

 

-------

Let TotalRevenue = num('$(ForeCastRevenue)') + num('$(AirRmRevenue)') + num('$(AncillaryRevenue)') - 635000000;

sFTP:
Load Null() as '$(TotalRevenue)'
AutoGenerate(0) ;

 


Store '$(TotalRevenue)' from sFTP Into [lib://FLD_CBI/BoostOurBusiness/$(vToday).txt](txt);

 

FileTransferConnector_SFTPUploadFile:
LOAD
Status as SFTPUploadFile_Status
FROM
[https://...]
(qvx);

 

-------

sunny_talwar

Looks like the double quotes show up because of comma, can you store your number using a decimal instead of comma?

msirinaydinie
Contributor II
Contributor II
Author

Yes, it worked. Thanks a lot, Sunny.

Have a wonderful day.