Skip to content

Whitespace values being treated as null #2320

@IainDM

Description

@IainDM

EPPlus usage

Personal use

Environment

Windows

Epplus version

8.4.2

Spreadsheet application

No response

Description

Here are the steps to reproduce it:

  1. Create a workbook in Excel with cell A1 on the first sheet = " " (a space, or any whitespace)
  2. Open the workbook in EPPlus and test A1.Formula. It will be ="" (empty string, not space).

It seems to be because the Formula setter trims the formula

if (value == null || value.Trim() == "")
{
Value = null;
return;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions