Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Is there any way to find out how table we using in QVW file.
Thanks
Prashant
Hi,
Syntax for Numbers of Fields is
Let vNoofFields = num(NoOfFields('TableName'));
For Getting NoOfFields in Each Table you have to use loop
Regards
Nandkishor
Hi Nandkishor,
Can you give some example of loop for the same.
Thanks
PM
Hi,
Try:
ODBC CONNECT TO [Excel Files;DBQ=ExcelFile.xlsx];
XlsTables:
SQLTables;
DISCONNECT;
LET vRows = NoOfRows('XlsTables');
FOR i = 0 TO $(vRows)-1
LET vSheetName = subfield(peek('TABLE_NAME', i,'XlsTables'),'$',1);
LET vFieldCount = noOfFields(TABLE_NAME);
$(vSheetName):
LOAD * ,
$(vFieldCount) as FieldCount
FROM [ExcelFile.xlsx]
(ooxml, embedded labels, table is '$(vSheetName)');
NEXT i
DROP TABLE XlsTables;
Hi,
You can use below code to get No Of Field
LET vNooftable= NUM(NoOfTables());
Let vNoofFields=0;
FOR i= 1 to $(vNooftable) step 1
Let vNoofFields = vNoofFields + num(NoOfFields(TableName(i-1))) ;
NEXT
Nandkishor Pandirkar