Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. Register by February 29th to save $200. Learn More
Not applicable

How can i track the specific sheet exist in a table or not and count the total number of rows in that sheet??

Hi All,

FOR Each File in FileList('$(vPath)*.xlsx')

ab:

Load  Field1,

          Field2,

          Field3,

          Field4,

          Field5

FROM

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

next File

ErrorLogTable:
LOAD
'$(ScriptError)') as Error,
'$(ScriptErrorDetails)'
as ErrorDetails,  
'$(#ScriptError)'
as ErrorCode,
'$(File)'
as FilePath,
FileTime() as ReloadTime,
FileName() as FileName
FROM
'$(File)'
(
ooxml, embedded labels, header is 5 lines, table is [ Output Tracker]);




I have the above script in this i am fetching multiple data from multiple excels and storing their erros in the below error log file.I need to check every time that

1-whether above output Tracker sheet in the each table is exits there  or not and want to capture sheet error in the error log table below if output tracker sheet does not exists.

2.And also want to know if sheet is blank /having null values.

3.i need to count the total number of rows in every excel.



how can i achieve the above requirements. Please any body let me know.


5 Replies
Highlighted
SreeniJD
Valued Contributor

Re: How can i track the specific sheet exist in a table or not and count the total number of rows in that sheet??

Hi Vasudha,

It seems there are some syntax issues in your script, can you pease share the sample qvw, I will correct it and will send it to you at the earliest.

Regards,

Sreeni

Highlighted
Not applicable

Re: How can i track the specific sheet exist in a table or not and count the total number of rows in that sheet??

hi jaaldurgam

Thanks for your reply.

Here i am attaching qvw.Please review it as according to you.

Regards,

Vasudha

Highlighted
Not applicable

Re: How can i track the specific sheet exist in a table or not and count the total number of rows in that sheet??

jaaldurgam

FYI,

I am also attaching a screen shot of excel.Please go through it.

Highlighted
SreeniJD
Valued Contributor

Re: How can i track the specific sheet exist in a table or not and count the total number of rows in that sheet??

Vasudha - Attachments are missing, can you please re-attach the same.

Thanks,

Sreeni

Highlighted
Not applicable

Re: How can i track the specific sheet exist in a table or not and count the total number of rows in that sheet??

jaaldurgam

FYI,

Regards,

Vasudha