I have a list of random excel cell references like {“A4”,“C6”,“D5”,“E7”,“X3”,“Y5”,“Z9”}
I want to set background color as yellow of above mentioned cells.
At the moment, I am looping through the list and set each cell color one by one using “Set Range Color” activity under the Excel Application Scope. The problem is, I have very large list of cells which takes long time, just to set colors on them.
Anyone have idea how to set background color on random list of cell references effective way like using VBA or any other codes?
Thanks @ghazanfar for the reply but I am already using this method which is really slow, as we can not pass random cell range all at once in this activity. That’s why I am looking for more efficient solution.
You can invoke vb.net code for that. I hope it will take less time. Are you using loop for for coloring that specific cell? Cuz looping cause slowness.
Dim workbook As Workbook = New Workbook
workbook.LoadFromFile(“…\Backgroundcolor.xls”, ExcelVersion.Version97to2003)
Dim worksheet As Worksheet = workbook.Worksheets(0)
set the backgroundcolor of Range[“A1:D1”]
worksheet.Range(“A1:D1”).Style.Color = Color.LightSeaGreen