Mian

How to delete a column from excel file in excel 2013

6 posts in this topic

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 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

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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

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

If you are talking aboutthen I have already added a comment.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now