SOLVED

excel report formatting issue

Copper Contributor

We checked in code and see that all the date format is coming properly in Sql, but when the same data is generated to excel file format using .net code , there is a formatting issue. this issue not occurring in excel 2016  but with latest excel 2021 

 

Arindam1300_0-1652171100437.png

 

2 Replies
best response confirmed by Hans Vogelaar (MVP)
Solution

@Arindam1300 I suspect that your system is set-up to work with dates in the dd/mm/yyyy format. Upon import, a date like 05/02/2022 is recognized as date 5 Feb 2022, where you probably intend it to be May 2 2022. A date like 04/21/2022 is not seen as a valid date and get imported, unchanged, as a text.

@Riny_van_Eekelen , Thanks for quick response , after system date format was changed it is displaying format correctly . 

1 best response

Accepted Solutions
best response confirmed by Hans Vogelaar (MVP)
Solution

@Arindam1300 I suspect that your system is set-up to work with dates in the dd/mm/yyyy format. Upon import, a date like 05/02/2022 is recognized as date 5 Feb 2022, where you probably intend it to be May 2 2022. A date like 04/21/2022 is not seen as a valid date and get imported, unchanged, as a text.

View solution in original post