angular-ui/ui-grid

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

devasena123490 opened this issue · 4 comments

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

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

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

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.

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.