Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
madhumitha
Contributor

Extracting data from Excel

Hello All,

Below is the format of my source excel. I am trying to extract the break down fields (both Alphabet and the numbers) as a different table in my script. How should I approach it?

   

Primary Doc noADXXXXXX
Primary Date StartDD-MM-YYY
Primary Date EndDD-MM-YYY
Primary Reference125
Secondary Doc noADXXXXXX
Secondary Date StartDD-MM-YYY
Secondary Date EndDD-MM-YYY
Secondary Reference125
Completeness% Complete
Some long TextXX%
Break Down
ABC15
QEF12
REF3
GAR2
1 Solution

Accepted Solutions
Ralf_Heukäufer
Contributor III

Re: Extracting data from Excel

I think not directly,

you can save the number of lines to a variable and work with an if clause in the next read like:

if (rowno() > myvaraible, exit script)

or you can read a fixed number of lines with the first command:

First ‒ Qlik Sense

7 Replies
Ralf_Heukäufer
Contributor III

Re: Extracting data from Excel

Hello,

can you upload an example Excel file?

madhumitha
Contributor

Re: Extracting data from Excel

Hi ,

I have attached the excel.

I am trying to extract E-Doc Name and No of Queries into one table in QV.

Thanks in Advance

Ralf_Heukäufer
Contributor III

Re: Extracting data from Excel

For that you can use:

LOAD

    "E-Doc name",

    "NO of Queries"

FROM [lib://Path to your File/Sample.xlsx]

(ooxml, embedded labels, header is 20 lines, table is Sheet1);

header is 20 lines says here he begins to read after line 20 as header

madhumitha
Contributor

Re: Extracting data from Excel

Thanks Ralf.

It extracts data.

Is there anyway I could stop the extraction when QV finds a newline in the excel?

Ralf_Heukäufer
Contributor III

Re: Extracting data from Excel

I think not directly,

you can save the number of lines to a variable and work with an if clause in the next read like:

if (rowno() > myvaraible, exit script)

or you can read a fixed number of lines with the first command:

First ‒ Qlik Sense

Ralf_Heukäufer
Contributor III

Re: Extracting data from Excel

Is that what you wanted to know, or did I misunderstand your second question?

If the answer was correct please mark your Your Question as correct.

madhumitha
Contributor

Re: Extracting data from Excel

Sure Ralf.

I will do that thanks!


Community Browser