pavanmac
9 years agoContributor
Re: How to fetch the data from a Grid/dataset/table?
Please help me how to fetch the data from the column name from excel.
baxatob wrote:1. Please go carefully through this topic: https://support.smartbear.com/testcomplete/docs/app-objects/specific-tasks/grids/index.html
2. You can create a DBTable variable from your excel file. Then you can use it something like this:
def get_value(column_name): source = Project.Variables.your_dbtable_variable source.Reset() while not source.IsEOF(): Log.Message(source.Value[column_name]) source.Next()The code above will save all values under the column_name into the Log.
3. Enable Post image on error option in your Project -> Properties -> Playback -> Log
4. You can't do it out-of-the-box, however you can create your own script or extension for this purpose.