Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Chanty4u
MVP
MVP

RE: Insert Empty

Hi all,

I have some excel data and i want to load that data into qlikview.

so my requirment is that.

i want to load all the data  and load   10 empty rows   shud be load   after 25th  record.?

is it possible?

Thanks in advance.

17 Replies
Chanty4u
MVP
MVP
Author

constant means fo evry after 25th record.  any for loop?

Chanty4u
MVP
MVP
Author

i want evry 25th after 10rows shud be  '0'

is there any posibilty?

jagan
Luminary Alumni
Luminary Alumni

Constant means if you just want this 25 and 60 rows use the code posted in previous thread.  If you want for every 25th row like 25, 50, 75, 100 etc.  then use FOR loop.

Regards,

Jagan.

Chanty4u
MVP
MVP
Author

is there any other posibilty while loading the data?

wizard?

jagan
Luminary Alumni
Luminary Alumni

There is no wizard check the help file for syntax.  What is your requirement acutally?  You want to insert 10 empty records after every 25 rows?

Regards,

jagan.

Chanty4u
MVP
MVP
Author

exactly..jagan

jagan
Luminary Alumni
Luminary Alumni

Hi,

Check this

Temp:

LOAD RowNo() AS ID

FROM

[EmpOff.xls]

(biff, embedded labels, table is Employee$);

LET vTotalRows = NoOfRows('Temp');

LET vNoofIterations = Ceil(vTotalRows/25);

LET vStartRow = 0;

LET vRowsHandler = 25;

DROP TABLE Temp;

FOR Index = 1 TO vNoofIterations

LET vRowCount = vStartRow + ((Index - 1) * 10);

Data:

LOAD ($(vRowCount) +  RowNo()) AS ID,

  EmpID,

     [Last Name],

     [First Name],

     Title,

     [Hire Date],

     Office,

     Extension,

     [Reports To],

     [Year Salary]

FROM

[EmpOff.xls]

(biff, embedded labels, table is Employee$)

WHERE RecNo() > $(vStartRow) AND  RecNo() <= $(vRowsHandler);

LET vRowCount = vRowCount  + 25;

Concatenate(Data)

LOAD

  ($(vRowCount) +  RowNo()) AS ID,

' ' AS EmpID,

' ' AS [Last Name],

' ' AS [First Name],

' ' AS Title,

' ' AS [Hire Date],

' ' AS Office,

' ' AS Extension,

' ' AS [Reports To],

' ' AS [Year Salary]

AutoGenerate(10);

LET vRowsHandler = vRowsHandler + 25;

LET vStartRow = vStartRow + 25;

NEXT

Chanty4u
MVP
MVP
Author

awesome  bro....

Thanks

this is exctly need.