nlgma 0 Posted April 4, 2011 A little back ground. Every morning I have to Open an excel spreadsheet click Data > Refresh all. A box pops up asking for my AD credentials. Then updates the spreadsheet with the data. I'm trying to script this, Short of mouse clicks and send commands. Is there a "excel.object.data_refresh($server,$port,$user,$password)" command that I can use? Share this post Link to post Share on other sites
DBCox 0 Posted April 4, 2011 I too need this. I am also looking for a similar command to go to "Developer>Macros" and then choose which macro to run. My intention is not to hijack Nigma's thread, but any help would be appreciated. Share this post Link to post Share on other sites
water 2,387 Posted April 4, 2011 (edited) Searching the Excel Developer Reference shows methods "RefreshAll" to refresh a workbook or "Refresh" to refresh OLE DB connection. Microsoft Excel uses the connection string specified by the Connection property. So it depends how Excel tries to access the data. Can you provide more information? Edited April 4, 2011 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - WikiTask Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - WikiTutorials:ADO - Wiki, WebDriver - Wiki Share this post Link to post Share on other sites