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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

is it possible to load data into tables by using Qlikview?


Hi,

would it be possible to load data into msaccess tables by using Qlikview.

so, my requirement is every day morning the access tables data should delete the previous day data and refresh with current day data. would it be possible with any macro/ with out macro.

Please can anyone suggest me.

Thanks in advance.

10 Replies
Anonymous
Not applicable
Author

Hi Amelia

As far as I am aware it is not possible to write to a database from Qlikview although there may be an extension that can manage it.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You can write back to databases in a couple of ways.

1. The script may issue SQL INSERT or UPDATE statements.

2. You can use a macro that uses and ADO or other database interface to write back using VBScript.

3. An extension -- I think there are some on the QlikMarket -- can write back from the UI using Javascript interfaces.

-Rob

jaimeaguilar
Partner - Specialist II
Partner - Specialist II

Hi, There are some "tricks" like this one: Dynamic Update - Simple Database

that allow you to modify data after loading to QV. Also you may want to check a solution called KliqPlan, that basically is a set of tools within an extension that allow you to enter data directly in QlikView and then reload and integrate with your current model

www.ktlabs.com/


regards


ashfaq_haseeb
Champion III
Champion III

May be this will help you

http://community.qlik.com/docs/DOC-5970

Regards

ASHFAQ

jduenyas
Specialist
Specialist

What I do is export to Excel,  data from a straight table or Pivot table, in a Macro I issue a command to open MSACCESS which I set to AutoExec and import the excel data.

Works like a charm (Even in a WorkGroup anviornment)

If you need more specific Macros etc please let me know and I will post.

Not applicable
Author

Thanks. could you let me know what is the process you follow step by step please. If it works for me again as usual Qlikview will be a charm in my organisation.

jduenyas
Specialist
Specialist

Amelia here is how I do it;

(All is done in the VB Edit module (Macro) which can be activated in various ways from QlikView )

'EXPORT THE LIST/TABLE/CHART TO EXCEL

SaveToExcel "ChartOrTableNumberName", "\\Folder\Directory\Where\You\Want\To\Save.xls"

In Access I have previously created a link to the Excel sheet and created an append query which is automatically activated when the Access File Opens (I've set a default form to open and then I set OnOpen Method of the form to start the query) It then reads the Excel sheet and imports data to the database table(s)

To start Access after the export to Excel has been done I have a line calling a sub which I call StartAccess

Sub StartAccess

'  ***  Credits are to Daniel Pineault / CARDA Consultants Inc. who wrote the code for that

Dim sAcc

Dim sFrontEnd

Dim sSec

Dim sUser
Dim objShellDb

Dim sComTxt

Dim sPwd

' Specify the full Path of the MSACCESS executable

sAcc = "C:\Program Files (x86)\Microsoft Office\Office14\MSACCESS.EXE"   ' Your location may be different

' Specify the location of the filename you want to open

sFronEnd  = "\\Your\File\Location\Path.accdb"

' If your database is secured by an mdw specify it, otherwise leave it blank

sSec = "\\Full\Path\To\System.mdw"

' If it is secured provide your name and password  otherwise leave them blank

sUser = "UserName"

sPwd = "UsersPassword"

'    ****************************

'You should not need to edit anything below this point

'   ******************************

' Launch the database

Set ObjShellDB = CreateObject("WScript.shell")

' Build the command

     sComTxt = chr(34) & sAcc & chr(34) &_

     " " & chr(34) & sFronEnd & chr(34)

     if isnull(sUser)=false and sSec<>"" then

          sComTxt = sComTxt & " /user " & sUser & " /pwd " & sPwd

     end if

     objShellDb.run sComTxt  ' This will launch the database

End sub

I also have set the database to Quit once the query was ran because I am interested only with the data being appended but you may want to keep it open. Your choice.

Regards

Josh

Not applicable
Author

Thanks. when I used this it is showing 'syntax error'

can help me please?

agomes1971
Specialist II
Specialist II

Hi,

have you done this...

see attached picture...

Hope it helps.

André Gomes