i have upload my xaml and my input file call Test Price
I wan to loop all in my worksheet as this is dynamic however i meet into trouble when it write the output in my first sheet is empty
My output file will contain all the worksheet with Cost Price and Project ID
IT can be empty or have value in it due to my Test Price 2 Excel file
can anyone help me out
This is how the flow is
Excel Application Scope (Input file)
Get all Worksheets (Listallsheets)
For Each Sheet in Listallsheets
Read Range (Sheet: YourSheet, Output DataTable: dtInput)
Assign activity:
costCentreRowIndex = -1
costCentreColumnIndex = -1
projectIdColumnIndex = -1
For Each activity (ForEach activity, TypeArgument: DataRow, Values: dtInput.Rows)
For Each activity (ForEach activity, TypeArgument: DataColumn, Values: dtInput.Columns)
Why do you use skip method to assign to rowsToProcess? It will be no row because there is valid data only in the first row of the datatable and it will be skipped by Skip(costCentreRowIndex+1).
I think it’s unnecessary to use rowsToProcess itself. Why don’t you process row directly (If there is blank row, try to process next row using Continue activity)? Is there any problem?
but i got issue getting this around so i found a way was to use this
rowsToProcess = dt.Rows.Cast(Of DataRow)().Skip(costCentreRowIndex+1)
then for each row in rowsToProcess i proceed
At least, the above is necessary to read data in the first sheet.
However, as i don’t consider other sheets, please find the better way to process whole the sheets.