Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I am using excel to display a large amount of data (10,000 lines) that is exported from a c# program. What i am trying to do is to colour in alternate rows to make this data easier to read. I currently have a function that iterates through each alternate row and colours them one at a time. for (int colouringIndex = 2; colouringIndex < rowCounter+3; colouringIndex += 2) { Range rowRange = sheet.get_Range("A" + colouringIndex.ToString(), brLastColumnWanted+ colouringIndex.ToString()); headingRange.EntireRow.Interior.ColorIndex = 1; } This is taking ~20 sec. So what i want to do is speed the process up by getting one Range that covers all the alternate rows that i need to colour and then set the colour for those rows in one go. Is there a way to do this in C#? In VBA you can do something like Range("1:1, "3:3", "5,5").Select Selection.Interior.ColorIndex = 1; Whats the C# equivalent? thanks Neil |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Color alternate rows when after hiding selected rows | Excel Worksheet Functions | |||
Auto-filter includes too much range | Excel Discussion (Misc queries) | |||
adding range name that includes a sheet name | Excel Programming | |||
=max(range includes #N/As) | Excel Worksheet Functions | |||
How to specify a Range which includes an integer variable | Excel Programming |