From: SharkTracker on 22 Jun 2010 14:47 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? -- Sharktracker
From: Rich P on 22 Jun 2010 16:12 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 *** Sent via Developersdex http://www.developersdex.com ***
From: SharkTracker on 22 Jun 2010 19:11 Thx -- Sharktracker "Rich P" wrote: > 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 > > *** Sent via Developersdex http://www.developersdex.com *** > . >
|
Pages: 1 Prev: use TypeConverter.ConvertToString(aType) Next: Questions about components on design time |