Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have some trouble with formatting a datecolumn in Excel. At first I export the datefields from a SQL-Database (without problems!). The exported columns look like this: 24.04.2005 00:00:00 Afterwards I'm trying to format the date like DD MMM YYYY (e.g. 24 Apr 2005). This works fine... but the abbreviations (shortcuts) of the months are always german. I need the english version. For example: German: Okt / English: Oct German: Mrz / English: Mar German: Dez / English: Dec I already tried System.Threading.Thread.CurrentThread.CurrentCultu re = System.Globalization.CultureInfo.CreateSpecificCul ture("en-US") but it seems to have no effect. I'm using MS Visual Studio 2003 with MS Excel 9.0 Object Library. I'm having MS Excel 2000 installed on my machine. Here's the code I'm using (only the relevant part): ================================================== ================='Set CultureInfo System.Threading.Thread.CurrentThread.CurrentCultu re = System.Globalization.CultureInfo.CreateSpecificCul ture("en-US") Dim xlApp As New Excel.Application Dim xlBook As Excel.Workbook xlApp.Visible = False 'Open Workbook xlBook = xlApp.Workbooks.Open("C:\Test.xls") xlBook.Worksheets("Test").columns("A:A").Select() xlApp.Selection.Numberformat = "DD MMM YYYY" 'Save Workbook xlBook.Save() 'Quit excel xlBook.Close(SaveChanges:=True) xlApp.Quit() xlBook = Nothing xlApp = Nothing ================================================== ================= Hopefuly someone has some experience in this. Thanks in advance Cheers Alex |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Rename Worksheets From German to English Sheet1 | Setting up and Configuration of Excel | |||
this formulas is in English ... what is it in German? | Excel Discussion (Misc queries) | |||
German translation for english formulas | Excel Discussion (Misc queries) | |||
english equivalent to German formular <ARBEITSTAG? | Excel Discussion (Misc queries) | |||
Sharing worksheets between English and German versions | Excel Discussion (Misc queries) |