Posted: 3 Nov 2016 3:19 EDT Last activity: 6 Nov 2018 20:02 EST
Unable to perform Excel operations using Excel connector
I am working on a scenario where I need to read employee ids from excel sheet, search each emploiyee id in an webapplication and get their corresponding designation and write back to the same excel. I am unable to read data from excel. Please help me with how I can read data in a loop and perform this operation
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
The Excel connector accepts an Excel file using the Open method. Notice the available methods.
You can use the GetCellValue method to retrieve a cell value and then do your work. Here is an example of this, iterating through the B column from a specified start row till the data element is blank.
You can do create the cell to update at the same time and then perform a SetCellValue with the data returned.
StartRow would be the row you want to start pulling the data from. You would supply that information based on where the data is in your spreadsheet. The For Loop starts with that as the initial index and concatenates that with the column letter and uses the result as input to GetCellValue.