Hi,
The exception is caused by the fact that the style of any element is null by default because it inherits the style of its parent or the document it’s placed in. When setting styles always use the following approach:
NFontStyle fontStyle = new NFontStyle("Arial", 10, FontStyle.Bold);
NStyle.SetTextStyle(table[0, 0], new NTextStyle(fontStyle, Color.Black));