I am using ImportArray() method to insert a data set to my Excel workbook.
Newly inserted rows should have a specific style applied - copied from one of existing rows in the worksheet.
Due to the size of my data set I am looking for a most efficient way to perform this task.
Currently I consider to ImportArray() first and than use Workbook.Cells[x,y].ApplyStyle(style, flag) method in two for-loops (rows and columns) to set appropriate formatting for each cells.
Is there some more efficient way to achieve the same goal ?
var worksheet = book.Worksheets;
//Accessing the cells of first worksheet
var cells = worksheet.Cells;
//Create a range of cells on which you wish to apply style
var range = cells.CreateRange(“A1:B4”);
//Apply style on the range