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

Help on formatting using NumberFormat

P: n/a
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
Nov 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.