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.
rank_nandha
Contributor II

How to load data??


Hi,

I have a Qlikview file where data is load from a database and excel file. Now the database connection is revoked and i missed the excel source. I want to load a new excel to the existing data source without disturbing the existing data or charts. Can some one help me here how to load the new source file into qlikview?

Regards,

Nandha

Tags (2)
1 Solution

Accepted Solutions
MVP
MVP

Re: How to load data??

In the copy, use a script like this:

Binary <path to your orginal file>;

Store Table1 into Table.qvd (qvd);

Store Table2 into Table.qvd (qvd);

...


to make the qvds.


And then in another copy, load the data you were getting from the database from these qvds.


Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
12 Replies

Re: How to load data??

Does the new source has the same column names as the revoked excel source?? If they are you can replace the old one with the new one and nothing in your application should break. I recommend making a copy of your application and then trying with the new source, so that in case something break you will have a back copy to go to.

Best,

Sunny

MVP
MVP

Re: How to load data??

If you do a reload from this new source file, you will lose the data that was loaded from the database (unless you saved that in a QVD - or other file form). I am assuming that you want to keep the data as you can no longer retrieve it from the database.

What I would suggest is that you create a copy of the qvw file. In the new copy, clear out the load script and start a new script with a binary load of the first document. Then, either:


  • save the relevant data to a QVD file, which you can then use as a data source in place of the database.
  • or, use that as the start of a longer script that adds the data from the new source through concatenation and/or joining) to the tables you binary loaded.
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
rank_nandha
Contributor II

Re: How to load data??

Hi Jonathan,

Can you please explain me with an example?

Regards,

Nandha

MVP
MVP

Re: How to load data??

In the copy, use a script like this:

Binary <path to your orginal file>;

Store Table1 into Table.qvd (qvd);

Store Table2 into Table.qvd (qvd);

...


to make the qvds.


And then in another copy, load the data you were getting from the database from these qvds.


Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
rank_nandha
Contributor II

Re: How to load data??

Hi Jonathan,

Its not working.

Regards,

Nandha

ankit777
Valued Contributor

Re: How to load data??

Hi, what jonathan mentioned should work.

You can take a binary load of your previous document in a new QVW and store the data base tables into QVD's.

You can then use these QVD's anywhere.

Sample Script


Binary [..\documents\ankit\qw\test\new qlikview document (2).qvw];
SET ThousandSep=',';
SET DecimalSep='.';
SET MoneyThousandSep=',';
SET MoneyDecimalSep='.';
SET MoneyFormat='$#,##0.00;($#,##0.00)';
SET TimeFormat='h:mm:ss TT';
SET DateFormat='M/D/YYYY';
SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';
SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';
Store tablename into tablename.qvd(qvd);

rank_nandha
Contributor II

Re: How to load data??

Ok Ankit Thanks for your reply.

But how will i use my old visualization if i developed this in new qvw???

Regards,

Nandha

ankit777
Valued Contributor

Re: How to load data??

I think it will be a bit tedious work. You might have to recreate the dashboard again. You will have to copy paste the objects.

rank_nandha
Contributor II

Re: How to load data??

I am getting the below error. Pls help me here

error.png

error_1.png

Regards,

Nandha

Community Browser