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

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

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,599
    =?Utf-8?B?RGF2aWQgVmFsbGU=?=
    Oct 29, 2003
  2. Replies:
    0
    Views:
    511
  3. zxo102
    Replies:
    3
    Views:
    3,244
    Stuart Corrie
    Aug 9, 2005
  4. Grey
    Replies:
    4
    Views:
    1,938
    Mark Rae [MVP]
    Oct 17, 2007
  5. Joel Finkel

    Cells[].Text or Cells[].Controls[0]

    Joel Finkel, Sep 1, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    294
    Joel Finkel
    Sep 1, 2003
Loading...

Share This Page