JohnOne Posted May 26, 2015 Posted May 26, 2015 Be more specific. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
water Posted May 26, 2015 Posted May 26, 2015 AutoIt comes with an UDF to work with Excel. Please have a look at functions _Excel_BookOpen or _Excel_BookOpenText and the example scripts in the help file. 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
robdogg1955 Posted July 11, 2015 Posted July 11, 2015 Could someone help me open a tab delimited file into excel? Here is what I have but I just cannot figure out how to change the delimiter to a tab. I know it should be simple. Using my script, I am browsing to a text file on my desktop. This way I can open files with different names. My only concern is opening text files that are tab delimited. Any help will be greatly appreciated. I guess my only problem is with the last line in the following code.#include <File.au3> #include <Excel.au3> Opt("MustDeclareVars", 1) Global $oExcel, $sFilePath, $Default_Folder, $File_Type Global $Result, $sDelimiter $oExcel = _Excel_Open() $sDelimiter = @Tab $Default_Folder = @DesktopDir $File_Type = "Text (*.txt)" $sFilePath = FileOpenDialog("Find File", $Default_Folder, $File_Type, $FD_FILEMUSTEXIST) If $sFilePath = "" Then MsgBox($MB_ICONWARNING, "Error", "No file chosen") Exit EndIf $Result = _Excel_BookOpenText($oExcel, $sFilePath, $sDelimiter) Data.au3
water Posted July 11, 2015 Posted July 11, 2015 Please check the help file for _Excel_BookOpenText. Delimiter is parameter #7. 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
robdogg1955 Posted July 14, 2015 Posted July 14, 2015 Please check the help file for _Excel_BookOpenText. Delimiter is parameter #7.I had be looking at the help file and just not quite understanding. I've played with it some more and it is working now.Here is what I ended up with:$Result = _Excel_BookOpenText($oExcel, $sFilePath, 1, Default, $xlTextQualifierDoubleQuote, False, @Tab, Default, Default, Default, True)But thank you for taking the time to respond Water. It is truly a great work you have and are doing with AutoIt.
water Posted July 14, 2015 Posted July 14, 2015 Thanks. Glad you like the UDF 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