hg2052 Posted April 6, 2013 Share Posted April 6, 2013 I have an .au3 script that retrieves data from web pages and writes them in an EXcel workbook that it opens. Hao can I make it write data from each web page in another sheet of the same workbook, without first saving the workbook and then reopening it? Link to comment Share on other sites More sharing options...
MuchTex Posted April 6, 2013 Share Posted April 6, 2013 (edited) I believe what you're asking for is _ExcelSheetAddNew(). After opening up a workbook you can simply use this function to open up a new sheet and begin writing data to it. Edit- I don't have access to test it right now, but you might have to use _ExcelSheetActivate() before you begin writing data to it, although I highly doubt this is necessary. Edited April 6, 2013 by MuchTex Link to comment Share on other sites More sharing options...
water Posted April 6, 2013 Share Posted April 6, 2013 You have to use _ExcelSheetActivate because all other functions just write to the active WorkSheet. This will change with my ExcelEX UDF - but this is still in a very early Alpha state. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
hg2052 Posted April 6, 2013 Author Share Posted April 6, 2013 MuchTex, _ExcelSheetAddNew() needs 2 arguments. I cannot retrieve the second from a workbook on the desktop,where I did already fill Sheet1. Link to comment Share on other sites More sharing options...
water Posted April 6, 2013 Share Posted April 6, 2013 Does the workbook you talk about already have all needed worksheets or do you need to add new worksheets to the workbook? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
hg2052 Posted April 7, 2013 Author Share Posted April 7, 2013 Water, It has the sheets, as always when you launch Excel.exe : Book1 -> Sheet1,Sheet2,Sheet3...etc Link to comment Share on other sites More sharing options...
water Posted April 7, 2013 Share Posted April 7, 2013 MuchTex,_ExcelSheetAddNew() needs 2 arguments. I cannot retrieve the second from a workbook on the desktop,where I did already fill Sheet1.The second parameter is the name of the new sheet and is optional. If you don't know the name simply let Excel select a name. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
water Posted April 7, 2013 Share Posted April 7, 2013 Ok, lets stick with your on this subject where you hve already posted some code we can work on.BTW: You know that the Mods don't like to see multiple threads on the same subject? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
hg2052 Posted April 7, 2013 Author Share Posted April 7, 2013 Water, 2.Mods...I know. But it's about 2 subjects in the same script. 1.In my script, when I tried to "let Excel choose",I got the error message saying it needed 2 parameters. Link to comment Share on other sites More sharing options...
water Posted April 7, 2013 Share Posted April 7, 2013 Can you please post the code you used. Parameter 2 of _ExcelSheetAddNew is definitely optional. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki 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