Hi Niveditha,
Thanks for your posting and using Aspose.Cells.
I have tested this issue with the latest version: Aspose.Cells for .NET (Latest Version) and found ApplyStyle() is working fine for a range of cells, rows, columns and all cells.
Please note, ApplyStyle() does not exist for a single cell, you can however create a range of single of cell and apply style to it.
Please see the following code. It copies style of cell B2 inside worksheet and then apply style to range of cells, row and column and entire worksheet on second and third worksheet. I have attached the source, output xlsx files and screenshot for your reference.
C#
Workbook workbook = new Workbook(“source.xlsx”);
Worksheet worksheet = workbook.Worksheets[0];
Worksheet worksheet1 = workbook.Worksheets[1];
Worksheet worksheet2 = workbook.Worksheets[2];
Style sty = worksheet.Cells[“B2”].GetStyle();
StyleFlag flag = new StyleFlag();
flag.All = true;
//Apply style on range of cells
Range range1 = worksheet1.Cells.CreateRange(“D5:H5”);
range1.ApplyStyle(sty, flag);
Range range2 = worksheet1.Cells.CreateRange(“F7”);
range2.ApplyStyle(sty, flag);
//Apply style on second column and row of the worksheet1
worksheet1.Cells.Columns[1].ApplyStyle(sty, flag);
worksheet1.Cells.Rows[1].ApplyStyle(sty, flag);
//Apply style on all cells of the worksheet2
worksheet2.Cells.ApplyStyle(sty, flag);
workbook.Save(“output.xlsx”);
Screenshot: