Solved

Exporting asp:Repeater display contents to MS-EXCEL 2010

Posted on 2011-09-30
8
1,486 Views
Last Modified: 2013-12-16
I am working with ASP.NET C# 3.5 web applications and the back-end is MS SQL 2008 R2. I am displaying arround 300 records in a asp:Repeater and this contains arround 10 fields. To display the records we are using the datasource, System.Collections.Generic.List<>. It is working fine.

The new requirment is, on a button click (say EXPORT button click) I need to export all the asp:Repeater contents with headings to a MS-EXCEL 2010 file. In the EXCEL SHEET I need to add dynamic images also. (i.e.) In the exel sheet on top IMAGE1, below that asp:Repeater contents and then below IMAGE2. Please give me a sample detailed code. I havn't any idea on this type of export area.

Note:- We are using the OS, Windows 7 for developement purpose and Windows Server R2 for live publish purpose. In my Windows 7 development machine I have Visual Studio 2008 and MS-Office 2010. But the live Windows Server R2 hasn't any visual studio or any ms-office. So, the code sample code should be flexible for both.
0
Comment
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
8 Comments
 
LVL 18

Accepted Solution

by:
mgfranz earned 250 total points
ID: 36903910
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 36903978
I wanted to add 1 other link which has tons of good resources at it, http://stackoverflow.com/questions/151005/create-excel-xls-and-xlsx-file-from-c
 
0
 

Author Comment

by:chrisdtrinityphysicians
ID: 36910575
Hi,
   http://www.leniel.net/2009/07/creating-excel-spreadsheets-xls-xlsx-c.html  This link is my exact requirement. But by my bad luck, that example has been provided in C#.NET 4.0 Framework version and so I can't use that. I clearly mentioned, I need the solution in C#.NET 3.5 Framework version. So, can anybody give exact correct code without any errors or any compatibility errors.

Please help me...
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 18

Expert Comment

by:mgfranz
ID: 36910834
What are you talking about?  What code samples?  The code shown on the page is said to be .NET framework 2.0.  

Are you getting compile errors?  Server-side errors?
0
 

Author Comment

by:chrisdtrinityphysicians
ID: 36911187
Sorry!!! That is due to some improper download dll error. Now it is working in local development machine. I need to test in live server. I will test on Moday and let you know the status. Thanks
0
 

Author Comment

by:chrisdtrinityphysicians
ID: 36946566
I created the excel import code with the help of the URLs http://www.leniel.net/2009/07/creating-excel-spreadsheets-xls-xlsx-c.html and http://npoi.codeplex.com/releases/view/19351. Everything is working fine in my local development machine and live server machine execpt a format issue. Please find the attachments.

 sample1.xlsx
 The above sample1.xlsx is the c# coding output. And this excel contains some fixed templates instead of blank cells. I want the blank normal cells only. How will I avoid the the fixed templates "Click to add data" from my c# coding?.

The output excel contains some template formats instead of blank cells.
Please anyone suggest some good idea.
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question