'How to validate whether a column exists in an excel?
I have data stored in the excel file i have passed the attributes excelPath and sheet Name as well. How to validate whether a column exists in an excel or not using PAF?
Solution 1:[1]
Use a custom tag :
###getExcelColNumber, Att1=columnName, Att2=keyName getExcelColNumber=com.tr.execution.activities.GetExcelColNumber
<activities>
<activity id="Validate_whether_a_Column_Exists_in_an_Excel">
<getExcelColNumber columnName="Version_num" keyName="colNo" ></getExcelColNumber>
<validation valGroupIds="ValidateColumn" ></validation>
</activity>
<valGroup groupId="ValidateColumn" >
<validate variable="colNo" condition="equals" value="-1" passMsg="Pass" failMsg="Fail" snapshot="false"></validate>
</valGroup>
</activities>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Meghana |
