Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to sort in the worksheet?

Hello,

I write a asp.net web page with Excel.Application for creating a Excel File.
I want that worksheet be sorted by some column.
I use xlSheet.Range(xx).Sort(xlSheet.Range(xxx)).
But it doesn't sort by my assigning.

How to sort the worksheet?

Thanks




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How to sort in the worksheet?

You have a syntax error
xlSheet.Range(xx).Sort xlSheet.Range(xxx)

If you include the arugment in parentheses and you are not returning a
value, you cause the argument to be evaluated, so in this case, the argument
becomes the value in the range rather than a reference to the range (which
is what is required).

--
Regards,
Tom Ogilvy


"YaYa" wrote in message
...
Hello,

I write a asp.net web page with Excel.Application for creating a Excel

File.
I want that worksheet be sorted by some column.
I use xlSheet.Range(xx).Sort(xlSheet.Range(xxx)).
But it doesn't sort by my assigning.

How to sort the worksheet?

Thanks






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I sort when the worksheet is locked? Neon520 Excel Worksheet Functions 3 January 9th 08 11:45 PM
Sort Worksheet Names? Stan Excel Discussion (Misc queries) 5 December 7th 07 03:06 PM
XP EXCEL WORKSHEET WILL NOT SORT. HOW TO FIX frank Excel Worksheet Functions 1 November 21st 07 07:53 PM
How do I sort a proctected worksheet Audrey New Users to Excel 3 July 27th 06 06:13 PM
New rows at the end of a worksheet don't sort with the worksheet John Bloor Excel Worksheet Functions 1 February 21st 06 07:03 PM


All times are GMT +1. The time now is 11:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"