Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to store data in an existing txt file

Hello,

I'm having some issues on inserting rows in an existing txt file.

Let's assume that i have called "history.txt" :

history:
LOAD * INLINE ['QVDSource','QVDDestination','NombredeLignes','DebutChargement','FinChargement','Erreur'];
STORE history into $(vAppPath)\historique.txt (txt,);

I have these variables : vNumberOfRows, vQVDSource, vQVDDest, vStartLoad, vEndLoad, vError

and i need to insert these variables into history.txt.

What i've tried to do is :

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

historique:
LOAD * FROM $(vAppPath)\history.txt (txt);
Concatenate(history)
LOAD * INLINE ['QVDSource','QVDDestination','NombredeLignes','DebutChargement','FinChargement','Erreur'
$(vQVDSource), $(vQVDDest) ,$(vNbLigne) , $(vStartLoad) , $(vEndLoad), $(vError)];

STORE historique INTO $(vAppPath)\historique.txt (txt);

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

The output file contains one more fields with symbols :

QVDSource,QVDDestination,NombredeLignes,DebutChargement,FinChargement,Erreur,QVDSource

,E_DIM_SPECIALITES_INFRA.QVD,,3/15/2017 4:47:09 PM,3/15/2017 4:47:09 PM,,DIM_SPECIALITES_INFRA.QVD

Do anyone have a solution ?

ManyThanks

1 Solution

Accepted Solutions
marcus_sommer

That's not an extra field else it is the utf8 header (BOM) from the file - qlikview could only store within the utf8 file-format. I think if you extend your file-format specification to: (txt, utf8) by loading and storing the file it should work.


- Marcus

View solution in original post

2 Replies
marcus_sommer

That's not an extra field else it is the utf8 header (BOM) from the file - qlikview could only store within the utf8 file-format. I think if you extend your file-format specification to: (txt, utf8) by loading and storing the file it should work.


- Marcus

Not applicable
Author

Thank you, it resolved my issue.