Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.dotnet.languages.vb,microsoft.public.excel.programming
|
|||
|
|||
Help on formatting using NumberFormat
Hi,
I have created this application on VB.Net that is supposed to read a Dataset Table, store the values in a 2-dimensional array of Strings and export the data to Excel. The format of the data is : Date Hour StationCode Value 12/03/2004 23:05:19 2239458 -2.45 The station Code is text but I dont mind Excel considering it a number. Everything is fine, I open Excel through VB.NET and "paste" the array into a Sheet. BUT the last two columns always have the "complain" (the little triangle on the side of the cells) that they are numbers stored as text. I have done an extensive search on the net. Follwoed all format and suggestions (create a macro and get the code from there, etc.) to NO avail. I use: ExcelSheet.Range("A2").EntireColumn.Cells.NumberFo rmat = "General" , "Standard", "Text", .... for the StationCode OR "0.00", "#,##0.00" , "Number", ... etc. for the Value But, ALL other formatting, column width, font (Bold, size, etc.), allignement, ...., etc. works FINE! I mean i can set it up through VB.Net What is extremely weird is that when i select the entire column, or individual cell, and i go to Format and choose Number the "complain"STILL doesn't go away !!!!! It ONLY goes away either by typing the number in the formula line on top, Or, of course, by choosing "convert to number" from the "complain" menu. I am running XP, Office 2002. The *only* detail* that might be important is that i have a French language version of both the OS and Office with English(US) Regional settings. Can anybody help from either newsgroups? (and i apologize if i am out of topic in either) I am loosing my sanity here! :) TIA -steve |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help on formatting using NumberFormat
I simply turn off that annoying number check. Tools--Options--Error
Checking tab, uncheck "Number stored as text" "steve" wrote: Hi, I have created this application on VB.Net that is supposed to read a Dataset Table, store the values in a 2-dimensional array of Strings and export the data to Excel. The format of the data is : Date Hour StationCode Value 12/03/2004 23:05:19 2239458 -2.45 The station Code is text but I dont mind Excel considering it a number. Everything is fine, I open Excel through VB.NET and "paste" the array into a Sheet. BUT the last two columns always have the "complain" (the little triangle on the side of the cells) that they are numbers stored as text. I have done an extensive search on the net. Follwoed all format and suggestions (create a macro and get the code from there, etc.) to NO avail. I use: ExcelSheet.Range("A2").EntireColumn.Cells.NumberFo rmat = "General" , "Standard", "Text", .... for the StationCode OR "0.00", "#,##0.00" , "Number", ... etc. for the Value But, ALL other formatting, column width, font (Bold, size, etc.), allignement, ...., etc. works FINE! I mean i can set it up through VB.Net What is extremely weird is that when i select the entire column, or individual cell, and i go to Format and choose Number the "complain"STILL doesn't go away !!!!! It ONLY goes away either by typing the number in the formula line on top, Or, of course, by choosing "convert to number" from the "complain" menu. I am running XP, Office 2002. The *only* detail* that might be important is that i have a French language version of both the OS and Office with English(US) Regional settings. Can anybody help from either newsgroups? (and i apologize if i am out of topic in either) I am loosing my sanity here! :) TIA -steve |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
.numberformat Q | Excel Worksheet Functions | |||
NumberFormat | Excel Discussion (Misc queries) | |||
numberformat? | Excel Discussion (Misc queries) | |||
VBA NumberFormat | Excel Programming | |||
Numberformat | Excel Programming |