473,396 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Asp.net to excel export format cells

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
Nov 19 '05 #1
1 6302
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" <go******@hotmail.com> wrote in message
news:35*************************@posting.google.co m...
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

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jonny | last post by:
Hello, I have created a button on my form which when pressed does the following : 1) Run a pre-defined Macro, which is picking up a query and running my data to excel. However, I need the...
2
by: EJO | last post by:
TIA, it is much appreciated! I export data from A2k to Excel 2k, and everything runs nicely...except when i export a particular A2k number field. The field in access is a numeric with two...
1
by: Chris | last post by:
Hi, I am using: DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, lcQueryName, strFilePathNamE, True ....to export my query data to an existing excel workbook. Then what i need...
4
by: BerkshireGuy | last post by:
I have the following Access code that exports to Excel, inserts a title, changes the color of the title, and then changes the format of several columns to currency. The following code sometimes...
4
by: Hans [DiaGraphIT] | last post by:
Hi! I want to export a dataset to an excel file. I found following code on the net... ( http://www.codeproject.com/csharp/Export.asp ) Excel.ApplicationClass excel = new ApplicationClass();...
0
by: ilamittal | last post by:
My problem is ,i have one repeater control.In that the data is binding at BtnGo click. In that if there are two same vehicle no but they service payments are different ,so after completing the data...
3
by: jmarcrum | last post by:
I want to export a report (that contains two separate queries, 1. Current year data, and 2. split-year data) from access into excel, but everytime I run my code and export the data to excel, it looks...
7
by: TG | last post by:
hi! I am trying to create a sql server table from an excel sheet. Here is the code I have: 'This procedure the xlsx file and dumps it to a table in SQL Server
1
by: accessvbanewbie | last post by:
I would like to export a recordset from access to excel but after each record is exported I want to insert a new row. The first recordset does this ok. However, the second recordset onwards does not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.