Skip to content

Working with Columns with Currency type #520

Description

@GilEducbank

Excel Type

  • XLSX

Upload Excel File

Please attach your issue file by dragging or droppng, selecting or pasting them.

cc07-08-2023T15_55_13.xlsx

MiniExcel Version

1.31

Description

When using the Miniexcel library to generate columns with numeric currency (R$) formats, the numbers are being displayed as strings in the format "R$ 500.00" instead of being displayed as numeric values like "500.00".

Steps to Reproduce

  1. Import the Miniexcel library into a project.

  2. Use the provided class as an example and define properties with the ExcelColumn attribute, applying currency formats to numeric values.

  3. Generate an Excel file using the Miniexcel library and populate values in the defined columns.

Expected Behavior

Values in columns formatted with the ExcelColumn attribute and the currency format (R$) should be displayed as numeric values, e.g., "500.00".

Current Behavior

Values in formatted columns are being displayed as strings in the "R$ 500.00" format.

Example Class Snippet

[ExcelColumn(Name = CessionConsts.Columns.PaymentValueName, Index = 19, Format = "R$ #,##0.00", Width = 15)]
public long PaymentValue { get; set; }

[ExcelColumn(Name = CessionConsts.Columns.PaymentDateName, Index = 20, Format = "dd/MM/yyyy", Width = 15)]
public DateTime PaymentDate { get; set; }

[ExcelColumn(Name = CessionConsts.Columns.ValueToSettleName, Index = 21, Format = "R$ #,##0.00", Width = 15)]
public long ValueToSettle { get; set; }

Those are the 3 last properties as example.
Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions