Asp.net to excel export format cells

Discussion in 'ASP .Net' started by Julien, Feb 28, 2005.

  1. Julien

    Julien Guest

    Hi,
    I'm actually trying to export a repeater to excel, everything seems ok
    but the problem is that the cells are not validated
    This means that for example date, it is left-centered instead of been
    right-centered when it is correctly validated, apprently excel doesnt
    recognize the numbers with coma and it is not possible to calculate
    formulas with this numbers.

    Does anybody know how to do that? Is it possible to use
    mso-number-format to do that?

    <td style='mso-number-format:"Short Date";'>
    <%#DataBinder.Eval(Container.dataitem,"date", "{0:d}")%>
    </td>

    Thanks

    Julien
     
    Julien, Feb 28, 2005
    #1
    1. Advertisements

  2. What technique are you using to export to Excel? There are a variety of
    ways to do this, perhaps you should try one of the others. Here's a good
    description of most of the techniques you could use:
    http://SteveOrr.net/Articles/ExcelExport.aspx

    Finally, if you find your needs become advanced, you could use a 3rd part
    component:
    http://www.SteveOrr.net/Reviews/AsposeExcel.aspx
    http://officewriter.softartisans.com/officewriter-37.aspx

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net


    "Julien" <> wrote in message
    news:...
    > Hi,
    > I'm actually trying to export a repeater to excel, everything seems ok
    > but the problem is that the cells are not validated
    > This means that for example date, it is left-centered instead of been
    > right-centered when it is correctly validated, apprently excel doesnt
    > recognize the numbers with coma and it is not possible to calculate
    > formulas with this numbers.
    >
    > Does anybody know how to do that? Is it possible to use
    > mso-number-format to do that?
    >
    > <td style='mso-number-format:"Short Date";'>
    > <%#DataBinder.Eval(Container.dataitem,"date", "{0:d}")%>
    > </td>
    >
    > Thanks
    >
    > Julien
     
    Steve C. Orr [MVP, MCSD], Feb 28, 2005
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?RGF2aWQgVmFsbGU=?=

    Invalid export DLL or export format

    =?Utf-8?B?RGF2aWQgVmFsbGU=?=, Oct 29, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    3,859
    =?Utf-8?B?RGF2aWQgVmFsbGU=?=
    Oct 29, 2003
  2. Peter
    Replies:
    1
    Views:
    10,250
    Steve C. Orr [MVP, MCSD]
    Nov 9, 2004
  3. Alessandro

    Problem to Export in Excel data format

    Alessandro, Jun 9, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    688
    Alessandro
    Jun 9, 2005
  4. Replies:
    3
    Views:
    11,717
    Patrick.O.Ige
    May 24, 2006
  5. zxo102
    Replies:
    3
    Views:
    3,706
    Stuart Corrie
    Aug 9, 2005
  6. Replies:
    3
    Views:
    1,416
    Edwin Knoppert
    Nov 10, 2006
  7. CDonlan
    Replies:
    0
    Views:
    1,026
    CDonlan
    Jun 19, 2007
  8. Grey
    Replies:
    4
    Views:
    2,552
    Mark Rae [MVP]
    Oct 17, 2007
Loading...