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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

My progress on fixed width

Hey community,

So is there anyone who can take this a bit further i have elaborated with fixedwidth generating csv files.

This is my result. Is is possible to make in a neater way? I want to easily make that on 78 columns in a certain value should be inserted for example. And the names to be left positioned always starting on column 20.

AND as a header in the CSV file i'd like to have the current date then all transactions.

Cheers it would be much, much apprecdiated!

Meddelandet redigerades av: Niklas Söderqvist

2 Replies
Not applicable
Author

Made it somewhat more clear but still is there anyway of doing this more efficient?

Date as header problem remaining...

FFN:

LOAD

LEFT(ID,20) & Repeat(' ',20-len(ID))&

LEFT(Namn,25) & Repeat(' ',25-len(Namn))&

LEFT(Efternamn,20) & Repeat(' ',20-len(Efternamn))&

LEFT(Test,10) & Repeat(' ',10-len(Test))&

LEFT(Hej,18) & Repeat(' ',18-len(Hej))&

LEFT(Tecken,1) & Repeat(' ',1-len(Tecken)) as FixedForNiklas

;

LOAD ID,

     Namn,

     Efternamn,

     Test,

     Hej,

     Tecken

FROM

(ooxml, embedded labels, table is Sheet1);

STORE * FROM FFN into C:\Users\niksod.NEONET\Desktop\Qlik\fixedwidthNiklas.csv (txt, delimiter is ','); LOAD ID,

stigchel
Partner - Master
Partner - Master

I would not use qlikview to generate fixed width files, why not do it straight from the source, excel in this case?

If you're determined, for the header you can use something like this :

LET vCurrDay = Left(Today(),10);

Header:

Load '$(vCurrDay)'&Repeat(Chr(32),10)&'Namn'&Repeat(Chr(32),16)&'Efternamn' as Final

AutoGenerate 1;

Concatenate Load

.........

rest of script