How to use SORT method in excel automation

When I develop report and define a excel automation variable, I want to sort the data by one specfic coloum after all the data is written into excel file How can I implement it. I notice the function SORT, but it failed. Would you like to tell me how to do it. My code : Sheet.Range(‘A1’,‘F100’).SORT(‘A1’);

As a general comment to MS word and MS excel automation : If you can’t find out how to achieve something that you can do manually in the application try this: 1. Go to the menu “Extra” in excel 2. Choose suboption “Macro” 3. Choose suboption “Record new Macro” 4. fill in the macro details and press OK 5. Now simulate the process you want to automate. 6. When done, press the stop button of the small dialog 7. Press ALT-F11 8. you will see the visual basic for applications editor now. 9. Search the modules and somewhere you must be able to find your recorded macro. 10. Try translating this code into navision. Shouldn’t be that hard. Extra tip : Sometimes VBA uses constants as parameters in functions that cannot be used in Navision. Select that word and press CTRL+I and VBA will show you the integer value of that constant. With this method i have solved all automation problems with WORD and EXCEL and you can really create advanced programs if you can get the hang of it.

Very useful info, thanks! edd

Thanks, I will try it.

Thank you so much that was just what I was looking for and it worked perfectly. [Yeah!] I wished I had looked here a few hours ago. Barbara C. Jefferies

youre all verry welcome