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

ITemplateMarkersProcessor and Localization

Hello,

I'm using the ITemplateMarkersProcessor with generic List of business objects which have a Property
[DataMember]
public DateTime Datum { get; set; }

The excel column where the values are be inserted is preformatted to display datetime values in the "Central European style" meaning that April, the 15th 2008 should outcome as "15.04.2008". The locale of the excel column is set to German (Germany).

But after having called ApplyMarkers the outcome is "04.15.2008".

The culture of the app is set to "de-DE". I am using VS 2008 Prof. (English Version) with Syncfusion Backofficestudio 6.2.0.40.

How can I preserve the localisation?

Bye
Andreas


1 Reply

YG Yavanaarasi G Syncfusion Team May 2, 2008 01:28 PM UTC

Hi Andreas,

Thank you for your interest in Syncfusion products.

I am able to see the issue that you have mentioned. But this issue can be solved by setting the numberformat. Please refer the below code snippet:


[C#]
sheet1.Range["B5:B14"].NumberFormat = "dd/mm/yyyy";
//Create Template Marker Processor
//Northwind customers table
ITemplateMarkersProcessor marker = workbook.CreateTemplateMarkersProcessor();
marker.AddVariable("Customers",northwindDt);
marker.AddVariable("NumbersTable", numbersDt);
//Process the markers in the template.
marker.ApplyMarkers();


Here is the sample for your reference:

http://websamples.syncfusion.com/samples/XlsIO.Windows/F-73327/main.htm


Please have a look at the above sample and if still the issue exists, could you please try reproducing it in the above sample and send us the modified sample so that we could sort out the cause of the issue and provide you a solution?


Regards,
G.Yavana




Loader.
Live Chat Icon For mobile
Up arrow icon