Mian 0 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. Share this post Link to post Share on other sites
JLogan3o13 1,621 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! Share this post Link to post Share on other sites
Mian 0 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) Share this post Link to post Share on other sites
water 2,359 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 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
Mian 0 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. Share this post Link to post Share on other sites
water 2,359 Posted December 21, 2015 If you are talking aboutthen I have already added a comment. 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
JLogan3o13 1,621 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! Share this post Link to post Share on other sites