Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have what I hope is a pretty simple question. I am writing a macro to export a table for a report and I need to first sort a column ascending. I also have to then input <101 to get the top one hundred. What is the syntax so I can make these selections before I export it into excel?
Thanks,
Austin
Hello Austin,
We use something like this within the script
Load A,B*C as E resident tab1 order by C desc, B asc, 1 desc;
But not sure if this is of any use to you... or could be around this...
Mama
I am not sure I follow your suggestion. I don't want to make these selections in the load script if that is what you are referring to. I want to make the selections right to the table. I want to do this because I have to filter several columns in this same manner and export each table seperately. Currently it is a manual process where I set these filters and then export the table, and I am just trying to write a macro that does it for me.
I was able to fix the sorting of the column ascending with a very easy solution. ActiveDocument.GetSheetObject("Table").Sortby 4. With 4 being the column number in the table. However, I still haven't been able to fix the search input.
Austin