nissl-lab / npoi

a .NET library that can read/write Office formats without Microsoft Office installed. No COM+, no interop.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NullReferenceException exception for olivegreen

naoak opened this issue · comments

NPOI Version

2.6.2

File Type

XLSX

Reproduce Steps

using NPOI.SS.UserModel;

var color = IndexedColors.ValueOf("OliveGreen");

Issue Description

The above code should return IndexColors of OliveGreen. But, it actually throws NullReferenceException.

I found a typo here.
https://github.com/nissl-lab/npoi/blob/master/main/SS/UserModel/IndexedColors.cs#L194

"olivergreen" should be "olivegreen".

Bug confirmed. Can you create a PR for this?

@tonyqus Sorry for the delay in replying. I have not been able to set up an environment to build and test this project, so it may take some time to create a PR. If you still want, I will gladly create a PR.

@Bykiev has helped created the PR. Thank you, guys!