We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Date Format to "DD/MM/yyyy"

can any body tell me how to write date format to “DD/MM/yyyy” i am writing following code

excel.Worksheets[0].Cells.Columns[(byte)i].Style.Custom = “dd/MM/yyyy;@”;

but it is showing date format and Local as “Armenian” but i want thihs to be English

could you please help me that…



Kindly try to change your code to:


Style style;

StyleFlag flag;

style = excel.Styles[excel.Styles.Add()];

style.Custom = "dd/MM/yyyy;@";

flag = new StyleFlag();

flag.NumberFormat = true;

excel.Worksheets[0].Cells.ApplyColumnStyle(i,style, flag);

If you still get such issue, kindly post your template file here.We will check it soon.

Thank you.

i am attaching the template and in that if we check format locale is displaying Areminian. but i want that to be english (US) or english (UK).format must be in “DD/MM/yyyy”.


i am not getting styleflag we are using version for excel could you tell me another solution for this version


Well, ApplyColumnStyle and StyleFlag are newer API and since you are using older version of the component.

I think you may try to set regional and local settings ( windows control panel ) to English United States if it works fine for you.

Thank you.