Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Carlos2
Contributor II
Contributor II

how to create a loop to automatically upload excel file into Qlikview

Hello I am new to Qlik and wanted a solution for this problem; I want to have an Excel spreadsheet located in some place that it uploads to Qlik bimonthly. I have read a post that offered a solution (below) but I wanted to know where in Qlik or how to put this script. 

 

Hi,

 

Try below script

 

LET vFilePath = '\\172.65.58.19\THEDRIVE\LISTING\Traore\LIST\';

 

FOR EACH file in FileList('$(vFilePath)\*.xlsx');   // Loops each excel file in the given Folder

LET vFileYear =  Left(Right(file, 9), 4);

LET vMaxYear = Rangemax(vFileYear, vMaxYear);

NEXT

 

Data:

LOAD *

FROM

[\\172.65.58.19\THEDRIVE\LISTING\Traore\LIST\Listing $(vMaxYear).xlsx]

(ooxml, embedded labels, header is 5 lines, table is [Listor]);

 

Labels (2)
2 Replies
Lauri
Specialist
Specialist

You mention Qlik View, but this is the Qlik Sense forum. In Sense, go to the app's data load editor and paste the script into it, then click Load Data.
Carlos18
Contributor
Contributor

OK, Thanks,

 

and how will the script be to connect it to a Google Drive? More specifically a Google Sheet

I am pretty new to Qlik and my programming knowledge its kind of low,

 

Thanks in advance