Jump to content

_Excel_RangeRead How to read all cells in a single column


Go to solution Solved by water,

Recommended Posts

_Excel_RangeRead($ExcelWorkBook, $Sheet, "A1:A3", 1)

I'm aware of how to use sheet ranges to delimit Range Read.

In the help file, I've also come across this:

_Excel_RangeRead($oWorkbook, Default, $oWorkbook.ActiveSheet.Usedrange.Columns("A:A"), 2)

How can I edit _Excel_RangeRead($ExcelWorkBook, $sheet, "A1:A3", 1) so it reads all cells of column A (similar to the help file example) but without using the workbook.activesheet.usedrange object oriented format/syntax?

Link to comment
Share on other sites

Sheet list is a 1D array of some of the sheets in the workbook that I'm iterating through in the function.

Something like:

Local $SheetList[4] = ["INFO", "CHECKLIST", "NAMELIST", "EMAILS"]

where INFO, CHECKLIST, NAMELIST, EMAILS are sheets in the xlsx file.

 

Link to comment
Share on other sites

  • Solution

A $ is missing, should be:

$Array = _Excel_RangeRead($ExcelWorkBook, $Sheet, $ExcelWorkBook.Worksheets($Sheet).Usedrange.Columns("A:A"), 1)

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • 1 year later...
  • Moderators
55 minutes ago, ThomasBennett said:

...not meaning to resurrect an old post

And yet that is exactly what you did, a year after the OP accepted the resolution from the guy who wrote the example you're pointing him to.

Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...