Copy link to clipboard
I working with Coldfusion 10.
I use cfspreadsheet for reading an Excel document. The result is in query. See example below.
As you see (black circled) you have the row ID 1, 2 and 3 (representing the row number of the Excel sheet).
I would like to read that value.
How can I read this value ?
I must make a query of query to filter data.
In case of mistake (bad values or missing values) I must display an error message which explain that "wrong value on row xxx".
After the query of query, the quantity of rows are not the same as the Excel document and the row id is not correct.
My ideas is to add a column to the result of query of the query with the row id of the original query (which represent the row number).
I already search on internet, this forum. But I don't know how to do that !
Or any one have a better ideas?
Thank you so much for your help
You can close the issue. I founded the solution (see code below)
<cfset queryAddColumn(YourQuery, "RowNum", ArrayNew(1)) />
<cfset querySetCell(YourQuery, "RowNum", YourQuery.currentRow, YourQuery.currentRow) />