lrstndm Posted February 2, 2016 Posted February 2, 2016 Hi All, How is it possible to read out a Excel file without opening the excel file itself in excel? With the current posts on the forum it's for me not possible to fix my issue. I was looking at the Excel.au3 include file but this did not help me. Could someone help me please? Regards, lrstndm
Jfish Posted February 2, 2016 Posted February 2, 2016 (edited) I do not believe Excel has to be open if you connect to it as if it were a database. That is the only way I am aware of that it can be queried without opening it (but @water may know better). This is an older example of a SQL connection to Excel. Edited February 2, 2016 by Jfish Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt
water Posted February 2, 2016 Posted February 2, 2016 Why do you need to avoid opening the file using the Excel application? Is there no Excel installed? Do you need to run your script invisible? Anything else? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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
lrstndm Posted February 2, 2016 Author Posted February 2, 2016 I do not want it to be opened. That is what happens when I tried to retrieve data from the Excel file. And also I was not possible to get some information from the opened Excel file.
lrstndm Posted February 2, 2016 Author Posted February 2, 2016 It needs to be invisible like reading out a text file from memory. Or is this not possible?
water Posted February 2, 2016 Posted February 2, 2016 I understand what you want. But If I understand why you want it I can provide a solution! My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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
water Posted February 2, 2016 Posted February 2, 2016 It's possible. Please check the help file how to open Excel invisible with the Excel UDF, function _Excel_Open. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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
lrstndm Posted February 2, 2016 Author Posted February 2, 2016 I have a "key-value" collumn. Which I want to read out. Where I just can enter a key and get the value from the cell next to it.
water Posted February 2, 2016 Posted February 2, 2016 Use _Excel_RangeFind to get the row where your key is located. Then use the Offset method to get the value of the column right to it. $aResult = _Excel_RangeFind($oExcel, "key", "column:column") $vValue = $oExcel.Range($aResult[0][2]).Offset(0, 1).Value Abraham 1 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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
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