Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Find Number of Columns

Hi All,

Is it possible to find out the number of columns present in an excel sheet in the script?

Thanks,

Asma

3 Replies
Gabriel
Valued Contributor II

Re: Find Number of Columns

Hi,

In the script after you've loaded the excel file then use NoOfFields() function'

So in script below, vFieldNo in UI will give you the number of columns in excel.

MyTable:

LOAD

*

from ExcelSource

;

LET vFieldNo = NoOfFields('MyTable');

amit_saini
Honored Contributor III

Re: Find Number of Columns

Hi,

You can use :

RecNo() as RawNo.

Thanks,
AS

Not applicable

Re: Find Number of Columns

NoOfFields('table_name')

will return the number of column last loaded in the table

Community Browser