Sorting in Excel question

gadzilla1gadzilla1 Member Posts: 316
I've created a report that exports data to Excel. I'd like to sort the report descending on a numeric variable that I created called 'NewValue'. Is there any way to easily sort in the function below? I have seen some great links on sorting excel and I'm just hoping there is a way to accomplish the task in this function. Any ideas? Thanks much.

MakeExcelDataBody()
ExcelBuf.NewRow;
ExcelBuf.AddColumn(Item."No.",FALSE,'',FALSE,FALSE,FALSE,'');
ExcelBuf.AddColumn(Item.Description,FALSE,'',FALSE,FALSE,FALSE,'');
ExcelBuf.AddColumn(NewValue,FALSE,'',FALSE,FALSE,FALSE,'');

(ExcelBuf is a Record variable w/Subtype Excel Buffer)

Comments

  • garakgarak Member Posts: 3,263
    U can use XLRange.Sort() for this
    Do you make it right, it works too!
  • gadzilla1gadzilla1 Member Posts: 316
    Thank you much for the reply.
  • garakgarak Member Posts: 3,263
    Please hope it could help you
    Do you make it right, it works too!
Sign In or Register to comment.