0

I am facing a peculiar problem with Excel with Data Refresh.

A solution that I am working on generates an Excel on the Server using OpenXml. In this Excel, I also add a Connection Part, which basically is a link to a webpage of my website.

This particular problem is not with English user, but if the User has Danish as the language.

When the Excel is generated, I specify a cell type as Date type (FormatId = 14) I set the text for the cell as an OADate.

The first rendering works fine and the date is displayed correctly. But in case of Danish, the decimal value of the OADate is stripped off and a large date is rendered making Excel show ######## (date to large)

But during Data Refresh, when Excel tries to refresh based on the data my webpage sends as Html table, Excel strips the decimal and a long number is placed in the date time cell.

I tried setting the style of the cell based on advice available here: Format HTML table cell so that Excel formats as text?

But it seems there is a difference in the way OADate works. Does anyone know what is the best way to construct the Html for Excel Data Refresh in case of OADate.

By changing the Html to have a cell value as Text work, but I want my Html to pass on the OADate to Excel.

regards, ~Mayur

Community
  • 1
  • 1
Mayur Kotlikar
  • 1,315
  • 2
  • 8
  • 11

1 Answers1

0

The delimiter "," or "." should be set as per user and then value should be set.

Mayur Kotlikar
  • 1,315
  • 2
  • 8
  • 11