Sorting an Excel worksheet using VB.net

  • Thread starter Thread starter SharkTracker
  • Start date Start date
S

SharkTracker

I am trying to sort an Excel worksheet using Visual studio 2005 VB but cannot
seem to get the commands correct.

does anyone have the code or code structure that will allow me do this?
 
If you are trying to sort an Excel worksheet that is open - that would
seem redundant. So I will suggest the following for either a closed
Excel worksheet, or an Excel worksheet you will be writing data to. In
either of these last two cases, you sort the data in the app first, and
then write that sorted data to the Excel sheet (Workbook). You will
have this Excel data in a dataTable in your VB.Net app. Use a dataview
object to sort the data and then write that sorted to Excel. I'm not
sure if or how well VS2005 supports Linq, but you can sort with Linq
also.

Rich
 
Back
Top