Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

leni_balakrishn
Contributor III

Load data from excel using Macro

Hi All,

Can any help me in loading the data from excel file to the Qlikview using Macro.

Using Macro I need to create connection to excel and load the data from excel to Qlikview.

Thanks in Advance

Thanks,

Leni

Tags (1)
1 Solution

Accepted Solutions
leni_balakrishn
Contributor III

Re: Load data from excel using Macro

Hi,

I have loaded data from excel using macro with Dynamic Update. Sample is attached

Do the following before using this sample:

1. Set Current Local Security -> Allow System Access in Macro settings

2. In the Macro give your excel file path.

3. If you are giving same fields as in my macro then no need to do anything, else changed the Field names in macro.

Regards,

Leni Balakrishnan

12 Replies
jsn
Honored Contributor

Re: Load data from excel using Macro

You can't load data from the macro (except for dynamic data update). The closest would be to trigger a reload or EDX job to start a reload and pull the Excel file in the script.

I'm guessing you're trying to create some kind of on demand reload where users can add data into an excel sheet and want to bring that into QlikView on the fly?

leni_balakrishn
Contributor III

Re: Load data from excel using Macro

Yes Johannes.

How we can do it??

jsn
Honored Contributor

Re: Load data from excel using Macro

I would probably recommend storing the Excel in a specific place (Folder) and then have the users trigger an EDX task to reload the document and then pick up the Excel file in the QlikView script.

leni_balakrishn
Contributor III

Re: Load data from excel using Macro

So we cannot do the below steps using Macro??

  1. Create a connection to the source data (xls).
  2. Read data from xls.
jsn
Honored Contributor

Re: Load data from excel using Macro

Technically you can using Dynamic Data Update, however, this only feeds data into the session for a particular user. If the user closes the document and opens it again, the data is gone. This is why I recommend the other approach instead

leni_balakrishn
Contributor III

Re: Load data from excel using Macro

Can you tel me how to do that using Dynamic update because my requirement is something like that thats y.

Thanks for your help Johannes

jsn
Honored Contributor

Re: Load data from excel using Macro

There should be a few examples of dynamic data update if you search the forums but in general I think it's better to revisit the requirements than pursue this solution for most situations.

leni_balakrishn
Contributor III

Re: Load data from excel using Macro

I searched in forum but I got for Insert, update and Delete only. Did'nt get an example to load data from an excel file.

If you have any samples it would be very helpful for me.

Thanks

leni_balakrishn
Contributor III

Re: Load data from excel using Macro

Hi,

I have loaded data from excel using macro with Dynamic Update. Sample is attached

Do the following before using this sample:

1. Set Current Local Security -> Allow System Access in Macro settings

2. In the Macro give your excel file path.

3. If you are giving same fields as in my macro then no need to do anything, else changed the Field names in macro.

Regards,

Leni Balakrishnan

Community Browser