Date problems on a server

  • Thread starter Jan Olof Jonsson
  • Start date
J

Jan Olof Jonsson

Hello.
We hawe a problem with the Excel-program on a public webserver.
Excel is installated to convert/produce HTML - documents to a website on the
server when client users in a webinterface upload Excel-documents for
converting and publishing to the site.
It is on a Microsoft Windows Server 2003 Standard Edition with a IIS-server,
Version: 6.0. with a .net application running the websolution.

The problem is that the dateformat in excel-cells will be in another format
then the client user sent in.
For exampe: The inputed document has dates in format in cells like
2004-01-01. When they are imported to html-code the format will be written
with slashes like 01/01/04. It doesnt matter what date-format it is in the
Excel document we upload. We have tried to format cells with the "force over
operating system language settings" and others but it will not solve the
problem.

We have tried to switch all language settings on the server to Swedish. In
Office-language settings and for the operating system.

We have a loginsequense for the administrator to run the officeapplication
in webconfig-file like <add key="OfficeUser" value="uid=__;pw=__;domain=__"
/> .

It will fail when no one is inlogged on the server. But when someone is
inlogged on the machine(as adm), the dateformat will be correct...But we
dont want to have the adm user inlogged on the server all the time.

We havent seem a good way to set/change the languagesettings in the code
either.
The code "System.Threading.Thread.CurrentThread.CurrentCulture = new
System.Globalization.CultureInfo("sv-SE")" will not take any effect. (Do we
have missed something here?)

It seems like the languagesettings will not take effect when the .net
applicationcode are login the user. Im very thankful for all answers that
can guide me forward on this.

Hälsningar JOJ
 
P

Patrice

Not clear. Once the value for a date is part of an Excel sheet, it is
displayed based on Excel settings and if you want to change the display
you'll likely have to change this from within Excel.

The problem is that you have to distinguish between the "date value" and its
external representation. If you pass the correct value, formatting it for
display is done by Excel.

As a side note, see also if something like 1/2/4 is correct (could be 2
january or 1 february depending on the country "style").
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top