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. Image for the cookie policy date

Excel file with Pivot corrupted if opened with XlsIO

Opening an xlsx containing a pivot with XlsIO on my development machine works as expected.
Opening the same file on production machine the file is corrupted.

What should i look for ?

In the attached zip:
* testmodel0011.xlsx, the original file
* resultOK.xlsx, working, opened on development machine
* resultKO.xlsx, corrupted, opened on production machine

Please help, this is a blocking problem.

Attachment: sample_17da3221.zip

3 Replies

DB Dilli Babu Nandha Gopal Syncfusion Team February 16, 2015 01:25 PM UTC

Hi Fabrizio,

Thank you for updating us.

We have analyzed the sample and understood that the time separator of the culture in production machine is dot(.) and causes corrupt in pivot. We are able to reproduce the issue and requesting you to use the below workaround. Also, kindly share us the time format of issue reproducing machine to investigate further on this.

As a workaround, you can set the time format of the current culture to colon(:) and it can be achieved by the following code snippet.

Code Snippets:

       System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.TimeSeparator = ":";

Please let us know if you have any concerns.


Dilli babu.

FC Fabrizio Cioni February 17, 2015 08:12 PM UTC

Hi Dilli Babu,
thanks for your suggestion, it didn't solve the problem but pointed me to the right direction.
Now i have the solution but (in my humble opinion) is just a workaround to some bug.

Allow me to detail.
I can confirm that the problem is about the dates, creating simples pivot without dates the file is created without corruption.
I also changed the time format setting on the server to ":" but i still had problems.

.Net doesn't allow direct change to TimeFormat but i achieved what  you were suggesting with this

            System.Globalization.CultureInfo ci = System.Globalization.CultureInfo.CreateSpecificCulture("it");
            ci.DateTimeFormat.TimeSeparator = ":";

            System.Threading.Thread.CurrentThread.CurrentCulture = ci;
            System.Threading.Thread.CurrentThread.CurrentUICulture = ci;

with this setting the file had not error, but now dates were written in it, so i had a different kind of failure.

After many trial i thought that you probably work and use english operative systems, so i tried to recreate the most 'sane' test environment and changed the code to
            System.Globalization.CultureInfo ci = System.Globalization.CultureInfo.CreateSpecificCulture("en");
            System.Threading.Thread.CurrentThread.CurrentCulture = ci;
            System.Threading.Thread.CurrentThread.CurrentUICulture = ci;

And... works!

So i suppose that on some computers (not my development Widnows 7 computer that is in italian, but on the Windows 2007 server that also is in italian) using a non english enviroment can cause some issues.

I write this for support to you, if it may help, and to any who may have similar problem.

Thanks for your kind support, it pointed me to the right direction.

DB Dilli Babu Nandha Gopal Syncfusion Team February 18, 2015 11:12 AM UTC

Hi Fabrizio,

Thank you for updating us.

We were able to reproduce the problem and have logged defect report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates


Please let me know if you have any questions.


Dilli babu.

Live Chat Icon For mobile
Up arrow icon