Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

New Post: Add Styles to workbook

$
0
0
How about changing the style of the workbook?
var workbook = new XLWorkbook();
workbook.Style.Font.SetFontName("Open Sans");
that throws a NullReferenceException
   at ClosedXML.Excel.XLFont.SetFontName(String value) in c:\ClosedXml\ClosedXML\ClosedXML\ClosedXML\Excel\Style\XLFont.cs:line 320
   at ClosedXML_Examples.HelloWorld.Create(String filePath) in c:\ClosedXml\ClosedXML\ClosedXML\ClosedXML_Examples\HelloWorld.cs:line 13
   at ClosedXML_Examples.CreateFiles.CreateAllFiles() in c:\ClosedXml\ClosedXML\ClosedXML\ClosedXML_Examples\Creating\CreateFiles.cs:line 17
   at ClosedXML_Examples.Program.Main(String[] args) in c:\ClosedXml\ClosedXML\ClosedXML\ClosedXML_Examples\Program.cs:line 8
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Viewing all articles
Browse latest Browse all 1877

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>