Lesson 9 Practice 2 A is about retrieving data from Excel and putting into a dataTable and then summing the data (in columns A and B) and putting the results back into the excel workbook in column C
I followed the instructions and found that my results were shifted up a row missing the results from the first row of data.
I worked out that the issue was that in the Read Range activity the add headers tick box which is ticked by default should be unticked as there are no headers in this data set. (probably going to be the same for parts B & C too)
I think this should be added to the instructions as we are all learning at this point and haven’t covered debugging yet.
Additionally the activity Write Value is mentioned several times, I think it should be Write Cell as I can’t find an activity Write Value (maybe that’s an old version, I don’t know).
Also part C says
I think it should be rowsCount.ToString
And I have another problem. In part C we are using the same excel spreadsheet to pull the data from that we were using for part A and B. When I try and run part C I get this message
This would imply to me that there is some sort of process lock on the file from one of the other workflows.
I definitely don’t have excel open (I have check processes in Task Manager there is no Excel) maybe the lock is from my code because I start with an excel application scope with a link to the Sums workbook and then a Write Cell that has a link to the workbook
In fact this is the problem as there are 2 different Write cell activities one from app integration (the correct one to use) and one from System-File-Workbook Write Cell (the wrong one and the one I was using)
The right solution to this is
Maybe if there was a Write Value activity as described in the instructions there wouldn’t be 2 activities with the same name but as I said I don’t think that there is a Write Value activity any more.