Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.dotnet.languages.vb,microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
.numberformat Q Aaron Excel Worksheet Functions 4 December 18th 09 02:15 AM
NumberFormat danpt Excel Discussion (Misc queries) 3 May 20th 09 10:55 PM
numberformat? Jack Sons Excel Discussion (Misc queries) 3 September 4th 07 03:44 PM
VBA NumberFormat Digit Excel Programming 1 January 30th 05 02:30 PM
Numberformat Syrus the Virus[_13_] Excel Programming 6 February 12th 04 02:12 PM


All times are GMT +1. The time now is 09:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"