The following snippet crashes with a System.NullReferenceException at the line: ws.Cells.ApplyRowStyle(1, abold, sf);
Thanks for your posting and using Aspose.Cells.
Please download and use the latest version: Aspose.Cells
for .NET v22.214.171.124 it should fix your issue.
I have tested your issue by running your code and it did not throw any exception. I have attached the output xlsx file generated by it for your reference.
Thanks, that seems to fix the issue I was dealing with.
Thanks for your feedback and using Aspose.Cells.
It is good to know that your issue is fixed with the latest version. Let us know if you encounter any other issue, we will be glad to look into it and help you further.