Help on formatting using NumberFormat

S

steve

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.NumberFormat =
"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
 
G

Guest

I simply turn off that annoying number check. Tools-->Options-->Error
Checking tab, uncheck "Number stored as text"
 

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

Top