Sign in to follow this  
Followers 0
neotrio

help needed !

2 posts in this topic

hi all,

following script is supposed to sort the elements of excel sheet column.

Dim $excel=ObjCreate("excel.application")

$excel.visible=1

$excel.WorkBooks.Add ; Add a new workbook

$excel.ActiveWorkBook.ActiveSheet.Range("A1:A5").Select

$excel.ActiveWorkBook.ActiveSheet.Cells(1,1).Value="hello" ; Fill a cell

$excel.ActiveWorkBook.ActiveSheet.Cells(2,1).Value="Cello" ; Fill a cell

$excel.ActiveWorkBook.ActiveSheet.Cells(3,1).Value="Dello" ; Fill a cell

$excel.ActiveWorkBook.ActiveSheet.Cells(4,1).Value="Aello" ; Fill a cell

$excel.ActiveWorkBook.ActiveSheet.Cells(5,1).Value="Bello" ; Fill a cell

;$Key1=$excel.ActiveWorkBook.ActiveSheet.Columns("A")

$excel.ActiveWorkBook.ActiveSheet.Range("A1:A5").Select.Sort("A")

;$excel.ActiveWorkBook.ActiveSheet.Sort.Ascending.Range("A1:A5").Select = 1

$excel.ActiveWorkBook.Saved = 1

Share this post


Link to post
Share on other sites



Might help if you post your support question in the support forum.

Also, use [ code] [ /code] tags (without spaces) when posting code vs. using bold print to represent it (easier on the eyes).


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

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
Sign in to follow this  
Followers 0