Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Use a variable for a parameter in _ExcelReadArray

$
0
0

I was hoping someone has figured this out.  I am using an Excel spreadsheet v 2012 to organize a list of email addresses for notification reciprients.  It is organized by location via column header. What I am trying to do is create a part of a script that can read from an ini file the column to start in and read those cells to an array that the script will use to address a SMTP email.   Here is what I have so far

#Include <file.au3>
#include <INetSmtpMailCom.au3>
#include <Array.au3>
#include <Excel.au3>
$inifile = FileOpen("C:\gpalert\gpsetup.ini", 0)
$L = FileReadLine($inifile, 7)
$oExcel = _ExcelBookOpen("c:\gpalert\GP Notification List.xlsx", 0)
$aArray = _ExcelReadArray($oExcel, 3, $L, 7, 1, 1) ;Direction is Vertical
$s_ToAddress = _ArrayToString($aArray, "; ", 1, 7)
  _ExcelBookClose($oExcel, 0, 0)

; msgbox below is just for testing

 MsgBox(0, "Test Excel",  $s_ToAddress)

 

Any help other method or work around would be most helpful.

 

Thanks
 


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>