EvenInTheFuture Posted March 23, 2023 Share Posted March 23, 2023 Hello, Novice user here. I am trying to update a script that used the old _ExcelReadcell to the current _Excel_RangeRead. The challenge I'm having is all of the examples for ReadRange are using hard callouts like A1 whereas I need to use variable callouts since the script is looping through the rows and columns reading one cell of data in excel and plopping it into a data field in another software. So the old line was: $DocNumber = _ExcelReadcell($oExcel, $eRow, $eColm) I've been trying different variations of the following: $DocNumber = _Excel_RangeRead($oExcel, Default, "$eRow, $eColm", 1) which is not creating an error, but is returning 0 Thank you, Link to comment Share on other sites More sharing options...
Solution Danp2 Posted March 23, 2023 Solution Share Posted March 23, 2023 You probably want to do something like this -- ; convert numeric row / column into "A1" range format $sRange = Chr(64 + $eColm) & $eRow $DocNumber = _Excel_RangeRead($oExcel, Default, $sRange, 1) Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
EvenInTheFuture Posted March 23, 2023 Author Share Posted March 23, 2023 35 minutes ago, Danp2 said: You probably want to do something like this -- ; convert numeric row / column into "A1" range format $sRange = Chr(64 + $eColm) & $eRow $DocNumber = _Excel_RangeRead($oExcel, Default, $sRange, 1) Worked beautifully. Thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now