This is a bit of an open-ended question.
I am using ListObjects quite a bit to render table-like data onto Excel using VBA. I basically pass a two dimensional array of type 'System.Object' from managed code (C#) and through automation, accept it as Variant on the VBA side through a macro.
Even if I pass a very big matrix, say 10,000+ rows, it gets rendered fairly quickly when I simply assign the 2d matrix, to say, a Range.
However, if I have to modify the attributes (like color for example) of data in individual cells, I can only seem to do it this way:
Cells(1, 1).Interior.Color = 33
that is, cell-by-cell, which is way too slow when I have to deal with tens and thousands of rows.
Just like one is able to block copy a 2d array into Range.Value and let Excel worry about how to display it properly as rows and columns, is there a way to maintain a 2d array of colors and expect Excel to do the looping internally for me once I give it a range where these colors must be applied? is there such a property on Range?
I am using ListObjects quite a bit to render table-like data onto Excel using VBA. I basically pass a two dimensional array of type 'System.Object' from managed code (C#) and through automation, accept it as Variant on the VBA side through a macro.
Even if I pass a very big matrix, say 10,000+ rows, it gets rendered fairly quickly when I simply assign the 2d matrix, to say, a Range.
However, if I have to modify the attributes (like color for example) of data in individual cells, I can only seem to do it this way:
Cells(1, 1).Interior.Color = 33
that is, cell-by-cell, which is way too slow when I have to deal with tens and thousands of rows.
Just like one is able to block copy a 2d array into Range.Value and let Excel worry about how to display it properly as rows and columns, is there a way to maintain a 2d array of colors and expect Excel to do the looping internally for me once I give it a range where these colors must be applied? is there such a property on Range?