We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Issue with Value2 property in XLSIO excel

Thread ID:

Created:

Updated:

Platform:

Replies:

118568 Mar 19,2015 10:10 AM UTC Mar 20,2015 04:47 PM UTC WPF 1
loading
Tags: XlsIO
Mahesh
Asked On March 19, 2015 10:10 AM UTC

HI,
I have a data grid from which I am exporting data to excel. Note that the regional settigns I am using is of Denmark(danish) and when I try to export data the value2 property always removes the decimal point(.) and makes it as continous string. That is, if I have value 123.0.1.0 it will convert to 123010 which is not expected. One more issue is, when I have some date string ex "01-01-2000" and I export the value2 shows it as some junk value and same appears in excel. This is really eating my time to fix the issue.
Is this some thing related to regional setting, if yes then need  a solution to which makes it to work irrespective of cultural settings.
Pasted piece of code which I am looking into,
Note: Here valueObj is object

  if (dataType != null && dataType.ToString().Contains("System.DateTime"))
                {
                  iRange.Value2 = valueObj;
                  iRange.CellStyle.NumberFormat = this._DateTimeFormatTables;
                }
                else
                {
                  iRange.Value2 = valueObj;
                  iRange.NumberFormat = ExcelFormatType.General.ToString();
                }

I tried using value instead of Value2, but no use.

Need help ASAP. 



Vikas Sekar [Syncfusion]
Replied On March 20, 2015 04:47 PM UTC

Hi Mahesh,

Thank you for using Syncfusion products.

When I try to export data the value2 property always removes the decimal point(.) and makes it as continous string. That is, if I have value 123.0.1.0 it will convert to 123010 which is not expected.

We are able to reproduce the issue and we suspect this to be defect. We are validating on this.

When I have some date string ex "01-01-2000" and I export the value2 shows it as some junk value and same appears in excel. This is really eating my time to fix the issue.

The reported issue is not reproducing at our side. We request you to share us the number format that is applied in this case. This will help us to investigate further and provide a prompt solution.

Please let us know if you need any clarification.

Regards,

Vikas


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;