Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
If you want to count no. of columns in the Excel file then please follow the below instructions.
1. Use tfileinputExcel component.
2. Add some basic instruction in the component with limit 1 but important is "Put one name in Schema 'excel_header' (You can use any name) and change its type to 'Dynamic' ". It will fetch the full row from the excel file.
3. Now Use second component 'tjavaRow'. Link your excel component through the 'main' row to tjavarow component.
4. Syn your schema in tjavarow component and put below mentioned code.
System.out.println("Counter ::: "+input_row.excel_heade.getColumnCount());
5. Now your job will count columns for you.
Note: You can store this counter value in any context variable and can use it.
Thank you
Sanjay