Skip to content

Keep original data type when creating a CellValue instead of converting to string to save memory. #1925

@MagnusBeijer

Description

@MagnusBeijer

Is your feature request related to a problem? Please describe.
When writing millions of cells to a sheet the memory usage is very high.

Describe the solution you'd like
Currently CellValue converts all values added to strings.
For example:

public CellValue(int value)
   : this(value.ToString(CultureInfo.InvariantCulture))
{
}

Would it not make more sense to add (keep) the int (or whatever native type is being added) and write that to the XmlWriter when serializing the data to reduce the memory footprint?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions