My goal is to collect data from a series of webpages and write that date to a single Excel worksheet.
I spent the morning trying to get this to work but I'm stuck on where to go.
I'm using _IETableWriteToArray to get data from a website into an array. I managed to write the table to Excel using _ExcelWriteSheetFromArray. Now where I'm stuck is I can't figure out how to append the Excel sheet once I fill the array with new data.
Either I can append the Array before writing to Excel or append the Excel file as I go. Which strategy is best? And if so, could I get a quick sample on how to implement this functionality?
Thanks!
Jeff
EDIT: Here's my non-working code so far:
Plain Text
#include <IE.au3> #include <Excel.au3> #include <Array.au3> Global $ESRB = "<a href='http://www.esrb.org/ratings/search.jsp?titleOrPublisher=&rating=&ratingsCriteria=&platforms=&platformsCriteria=&searchVersion=compact&content=&searchType=title&contentCriteria=&newSearch.x=33&newSearch.y=11' class='bbc_url' title='External link' rel='nofollow external'>http://www.esrb.org/ratings/search.jsp?titleOrPublisher=&rating=&ratingsCriteria=&platforms=&platformsCriteria=&searchVersion=compact&content=&searchType=title&contentCriteria=&newSearch.x=33&newSearch.y=11"</a> Global $DataFile = "C:TempDataFile.xls" Global $aGlobalData ; Load ESRB webpage $oIE = _IECreate($ESRB, 1) Do $oTable = _IETableGetCollection($oIE, 2) ; Get Table from webpage $aTableData = _IETableWriteToArray($oTable,1) ;Write table to array ;~ _ArrayDisplay($aTableData) _ArrayAdd($aGlobalData, $aTableData) ; Add more data to array _ArrayDisplay($aTableData) $o_nextPage = _IEGetObjByName($oIE, "nextPage") ;Get nextPage Object $p_nextPageDisabled = _IEPropertyGet($o_nextPage, "isdisabled") If $p_nextPageDisabled == False Then _IEAction($o_nextPage, "click") EndIf Until $p_nextPageDisabled == True
Edited by Jefferds44, 27 February 2012 - 05:07 PM.




