Remove dependency on System.Web to Enable .NET client profile support

Aug 18, 2013 at 7:22 AM
I think if you make a separate version of this great tool that does not have anything to do with ASP, you can not only reduce the size of the assembly but also enable applications to be targeted for client profile versions of .NET
Aug 19, 2013 at 5:27 AM
IIRC, the reason for the System.Web reference has nothing to do with ASP.NET itself, it's because Excel uses HTML's named character references in its XML rather than all-numeric references and the 4.0 BCL doesn't have another built-in option for decoding these references.

I have a replacement HtmlDecode function I'd like to submit, but my last few submissions seems to have disappeared without a trace in the current build, and I'm losing faith that the maintainers of this library will roll up the many important fixes over the last year and actually release something (the last stable release was almost a year and a half ago).
Aug 19, 2013 at 5:53 AM
Ok, I finally found my last submission, it's in the branch called "FormulaParser." I'm very new to CodePlex and have no idea WTH these branches mean or why this one is sitting around for a year without being merged into default.

I'll see if I can fork that branch, add my HtmlDecode function, and submit a pull request (I think I got all the terminology right there). At least that will remove the dependency that I added while working around a bug in SecurityElement.Escape (a bug that is still there in the default branch).

It looks like FormulaParser inexplicably also contains the code that works around the buggy System.IO.Packaging BCL, so I'm crossing my fingers I can start using this branch in production.
Nov 8, 2013 at 10:30 PM
Did you have any luck including your replacement for HtmlDecode? I would like very much to run it using the .net client profile.
Dec 1, 2013 at 4:41 AM
It appears the references are gone in the latest version of the FormulaParser branch. I saw one reference to include System.Web still there, but nothing called within that library.

I still think there are some underlying bugs in how EPPlus handles escaped characters versus how Excel handles them, but I haven't had a chance to really dig into it.
Feb 21, 2014 at 2:23 AM
It looks like the dependency was introduced on 3/19/2013 for the HttpUtility.UrlDecode function.

The repository seems to be down at the moment, but one could try using System.Uri.UnescapeDataString as a replacement function. I don't see any tests so I wouldn't know if that function fully worked.

As of right now i'm using to keep the System.Web reference out and allow me to use the client profile.