i need to create and download a excel sheet in c# asp.net. I used writing Range. because it is fast. but i need to format the excel sheet. According to a property(usercolor) of the user object, i need to color the row. but when writing to range how can i do that?
i am using this code to write
var startCell = (Range)sheet.Cells[2, 1];
var endCell = new object();
endCell = (Range)sheet.Cells[(usersList.Count + 2), noofcolums];
var writeRange = sheet.get_Range(startCell, endCell);
writeRange.Value2 = data;
data is a TwoDimensionalObject. it is created by user object.