+ Reply to Thread
Results 1 to 4 of 4

Values being formatted differently when opening spreadsheet using ado.net

  1. #1
    Joe
    Guest

    Values being formatted differently when opening spreadsheet using ado.net

    I have a some-what simple app for importing data from excel to our database.
    The app is written in C# and uses ado.net.

    When I open the xls file, it displays in a grid to show the values.

    The problem is values are formatted differently depending on the machine.

    I have 2 machines. One the first one (excel installed) I open the xls file
    and all values display as decimal even though in excel there displayed as
    percents. This is fine and how I want it.
    On the second machine (excel not installed) the values display as percents.

    What can cause the difference in formatting?

    Thanks,
    Joe



  2. #2
    onedaywhen
    Guest

    Re: Values being formatted differently when opening spreadsheet using ado.net


    Joe wrote:
    > I open the xls file
    > and all values display as decimal even though in excel there

    displayed as
    > percents.


    How are you opening the xls file without Excel? Using a viewer?
    ADO.NET?

    Jamie.

    --


  3. #3
    Joe
    Guest

    Re: Values being formatted differently when opening spreadsheet using ado.net

    I'm opening it in a DataGrid.

    "onedaywhen" <jamiecollins@xsmail.com> wrote in message
    news:1108548021.217665.212060@o13g2000cwo.googlegroups.com...
    >
    > Joe wrote:
    > > I open the xls file
    > > and all values display as decimal even though in excel there

    > displayed as
    > > percents.

    >
    > How are you opening the xls file without Excel? Using a viewer?
    > ADO.NET?
    >
    > Jamie.
    >
    > --
    >




  4. #4
    onedaywhen
    Guest

    Re: Values being formatted differently when opening spreadsheet using ado.net


    Joe wrote:
    > > How are you opening the xls file without Excel? Using a viewer?
    > > ADO.NET?

    >
    > I'm opening it in a DataGrid.


    You may be showing it in a gid but how are you accessing the data in
    the xls: ADO.NET, COM automation, etc? Posting some code may help us.

    Jamie.

    --


+ 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