Mian Posted December 17, 2015 Share Posted December 17, 2015 If I am not wrong _Excel_RangeDelete() function is used to delete rows/columns/cells from the excel file. In the manual page there are examples of deleting range and rows but I found not a single example of deleting a whole column. I tried this _Excel_RangeDelete($oExcel, "1") but no success. Please help. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted December 18, 2015 Moderators Share Posted December 18, 2015 Hi, @Mian welcome to the forum. The snippet below works just fine for me:#include <Excel.au3> Local $oExcel = _Excel_Open() Local $oWorkbook = _Excel_BookOpen($oExcel, @ScriptDir & "\1.xls") _Excel_RangeDelete($oWorkbook.ActiveSheet, "B:B", $xlShiftToLeft) "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Mian Posted December 20, 2015 Author Share Posted December 20, 2015 @JLogan3o13 Thank you for the solution. I used the following code to remove the column but I will update my code now ; ; To remove the excluded column ; send("^g") ; ^ is for CTRL sleep(500) WinWait("Go To") sleep(500) WinActivate("Go To") sleep(500) ;send("R") send("G1") sleep(500) Send("{TAB 3}") sleep(500) Send("{ENTER}") sleep(500) send("^{SPACE}") sleep(500) send("^-") sleep(500) Link to comment Share on other sites More sharing options...
water Posted December 20, 2015 Share Posted December 20, 2015 It is always a good idea to use the UDFs that come with Autoit to automate Office.Automating the GUI might interfere with user actions, using COM (most of the time) does not. 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...
Mian Posted December 21, 2015 Author Share Posted December 21, 2015 very true @water. thats why I posted the question I had another question posted, can you please have a look of that too. Link to comment Share on other sites More sharing options...
water Posted December 21, 2015 Share Posted December 21, 2015 If you are talking aboutthen I have already added a comment. 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...
Moderators JLogan3o13 Posted December 21, 2020 Moderators Share Posted December 21, 2020 @benmartin9920 Did you not see that this thread is over 5 years old? Please STOP resurrecting old threads. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! 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