+ Reply to Thread
Results 1 to 2 of 2

Help on formatting using NumberFormat

  1. #1
    steve
    Guest

    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.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



  2. #2
    Charlie
    Guest

    RE: 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.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
    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1