angular-ui / ui-grid

UI Grid: an Angular Data Grid
http://ui-grid.info
MIT License
5.39k stars 2.47k forks source link

Export to CSV with CSV injection in C# code - Issue with (-) index #7240

Closed devasena123490 closed 1 year ago

devasena123490 commented 2 years ago

Hi Team,

I've implemented a logic to export data to CSV using C# and it has negative values (example: -10.0000) As per CSV injection, I added (') in the front . Something like below.

        if(value.StartsWith("-"))
        {
            value = value.Replace("\"", "\"\"");
            return $"\"\'{value}\"";
        }

        When I export to CSV , I could see the (') in excel cell. But I have to format that from the code. How to fix that? I dont want to see (') when I export to CSV

image

devasena123490 commented 2 years ago

Hi @All, Can someone look into this issue? Please

mportuga commented 2 years ago

I am not sure this qualifies as an UI-Grid defect

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 year ago

This issue has been automatically closed because it has not had recent activity. If you believe that this is still an issue in the latest version, feel free to re-open it. Thank you for your contributions.