PC Review


Reply
Thread Tools Rate Thread

Asp.net to excel export format cells

 
 
Julien
Guest
Posts: n/a
 
      28th Feb 2005
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
 
Reply With Quote
 
 
 
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      28th Feb 2005
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...writer-37.aspx

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


"Julien" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel format in selected cells have changed to DATE format!!!! mybigspamemailaccount@gmail.com Microsoft Excel Discussion 2 4th Feb 2010 03:24 PM
export cells to print in avery 5167 format James Microsoft Excel Worksheet Functions 4 6th Jan 2009 04:40 PM
How to Export datas from Excel cells to another excel/dbase file =?Utf-8?B?dmlyYWo=?= Microsoft Excel Misc 2 11th Jun 2007 10:55 PM
export to XL - problem with currency format from cells Michel Peeters Microsoft Access Form Coding 1 24th May 2007 09:14 PM
Asp.net to excel export format cells Julien Microsoft ASP .NET 1 28th Feb 2005 09:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:31 AM.