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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

working in local but fails to pic from sharepoint path

Hi GURU's

Data Coming from share point path:http://teamsites.xxxxx.com/sites/USREMS/USREMS2/quality/auditschedule/Shared%20Documents

contains excel sheets as attached.

i want to load data using automation script.

My code working fine if i place excel sheets in local but its fails to pic from Sharepoint path

here is the code

sub ScanFolder(Root)

for each FileExtension in 'xlsx'

   for each FoundFile in filelist( Root & '\*.' & FileExtension)

Let vFileName = subfield('$(FoundFile)','\',SubStringCount('$(FoundFile)','\')+1);

if (Wildmatch(vFileName, '*US REMS Audit Workbook DOL*')) then

Let vYear = Left(vFileName,4);

Let vSheetName = vYear & ' Audit stats Tracking';

Audit_Stats_Tracking:

LOAD

  [Audit Date],

  [Pharmacy ID],

  [Pharmacy Name],

  Address,

  City,

  State,

  PharmacyTYpe as [Pharmacy Type],

  LeadAuditor as [Lead Auditor],

  AuditType as [Audit Type],

  AccountManagerName as [Account Manager Name],

  MAAccountDirector as [MA Account Director],

  [Product Audited],

  [Overall Audit Result],

  [Observation Yes or No],

  [Repeat Observations],

  [Tier 1],

  [Tier 2],

  [Number of Counselors],

  [Date Audit Report Issued],

  [Date Response Received],

  //[Date Certificate sent],

  [Effectiveness Check],

  Comments,

  [Observation Rating],

subfield('$(FoundFile)','\',SubStringCount('$(FoundFile)','\')+1) as FileName

        

      FROM [$(FoundFile)] (ooxml, embedded labels, table is '$(vSheetName)');

   End If  

   next FoundFile

next FileExtension

end sub

Call ScanFolder('$(vFilePath)') ;

Note:

it should pic only below excels not other 2 excels

2014 US REMS Audit Workbook Dol.Xlsx

2015 US REMS Audit Workbook Dol.Xlsx

1 Reply
marcus_sommer