Free Support Forum - aspose.com

Styling in Aspose.Cells

Hi Support,
Can we defined all the style in one sheet for the styling of excel ?
like we have css stylesheet in web.

Thanks

@PolarisAP,

Thanks for your query.

I think you may define your default style at workbook level which you need to apply to the whole workbook, see the sample code segment for your reference:
e.g
Sample code:

 Workbook workbook = new Workbook();


            //Set the default font of the workbook

            Style style = workbook.DefaultStyle;

            style.Font.Name = "Calibri";

            style.Font.Size = 10;


            workbook.DefaultStyle = style;

You can also define your custom style and specify your desired attributes and options. Now you may apply this style to any worksheet cells in the workbook for your needs. If you want something different, kindly do provide more details and sample files to evaluate it on our end. Also provide steps on how to do it via MS Excel manually, we will check it on how to do it via Aspose.Cells APIs.