![]() |
|
[.NET] Excel Sorting with Vb.net - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] Excel Sorting with Vb.net (/showthread.php?tid=5970960) |
Excel Sorting with Vb.net - JavaJane - May 17, 2019 I'm creating and manipulating an Excel spreadsheet from within my VB.net program. I'm using these imports: Code Imports Microsoft.Office.Interop.ExcelI'm creating these objects: Code Dim oExcel As ObjectInitializing them: Code oExcel = CreateObject("Excel.Application")After writing to the cells I'm sorting like this: Code myRange = oSheet.Range("A2", "H50" )Everything works fine at this point. I've made some of the cells background color green in column H and now I want to sort on the cell background color. What is the code to accomplish that? RE: Excel Sorting with Vb.net - tweety - May 29, 2019 since no one answered lol.. take a look at this; https://stackoverflow.com/questions/23653263/sorting-on-cell-color-in-excel-using-c-sharp i dont really like linking sof links but couldnt find much on it, the example in that post seems to be what you're looking for, something like this? PHP Code give it a shot, if it doesnt work il take a look when im home |