By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,254 Members | 2,418 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,254 IT Pros & Developers. It's quick & easy.

Date problems on a server

P: n/a
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.CurrentCult ure = 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

Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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").

"Jan Olof Jonsson" <ja*************@framehouse.se> a écrit dans le message
de news:uS**************@tk2msftngp13.phx.gbl...
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.CurrentCult ure = 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

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.