Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Add additional header or data into excel after exporting - asp.net application

Reply
Thread Tools

Add additional header or data into excel after exporting - asp.net application

 
 
stephen
Guest
Posts: n/a
 
      01-05-2010

Hi,

I am exporting data from datagrid into excel. lets says that the grid has 3
sets of information in columns like (billing address, shipping address and
order info). If I export it, it creates an excel document but I want to
write additional header like "Billing Infomation", "Shipping address",
"Orders" above the columns on the excel generated. Basically I want to add
additional info into the excel after or before the excel is generated.

Any suggestions on how this can be done? Can it be done via asp.net
application or should it be done after the excel is created?
Any sample or article will be great.

Thanks,
Stephen


 
Reply With Quote
 
 
 
 
Gregory A. Beamer
Guest
Posts: n/a
 
      01-05-2010
"stephen" <(E-Mail Removed)> wrote in news:#WgICKjjKHA.5568
@TK2MSFTNGP02.phx.gbl:

> Any suggestions on how this can be done?


Yes

> Can it be done via asp.net
> application or should it be done after the excel is created?


Yes.

You have two options:

1. Take over the Excel creation process.
2. Add to the document.

Now, as far as how, I have no clue how you are creating the Excel
document. I know from a DataGrid, but is this the MS dataGrid control,
or a third party? Are you using a standard built in "export" button or
is the export something you dinked with?

For simple excel, an HTML table can create the document. You merely need
to change the MIME type in the response header. If you need full Excel,
then someone or something is creating the export.

With more info, I might be able to help more.

Peace and Grace,

--
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Reply With Quote
 
 
 
 
Mark Stevens
Guest
Posts: n/a
 
      01-06-2010
There is a library on Codeplex which will allow you to generate Excel
2007 documents. It has an option to paste data tables into the
spreadsheet. I have used it to do he sort of this you are attempting
to do from data tables and single entries rather than grids.

Library can be found at: http://simpleooxml.codeplex.com/

Cheers,
Mark

On Tue, 5 Jan 2010 12:11:28 -0600, "stephen" <(E-Mail Removed)>
wrote:

>
>Hi,
>
>I am exporting data from datagrid into excel. lets says that the grid has 3
>sets of information in columns like (billing address, shipping address and
>order info). If I export it, it creates an excel document but I want to
>write additional header like "Billing Infomation", "Shipping address",
>"Orders" above the columns on the excel generated. Basically I want to add
>additional info into the excel after or before the excel is generated.
>
>Any suggestions on how this can be done? Can it be done via asp.net
>application or should it be done after the excel is created?
>Any sample or article will be great.
>
>Thanks,
>Stephen
>

--
|\ _,,,---,,_ A picture used to be worth a
ZZZzzz /,`.-'`' -. ;-;;, thousand words - then along
|,4- ) )-,_. ,\ ( `'-' came television!
'---''(_/--' `-'\_)

Mark Stevens (mark at thepcsite fullstop co fullstop uk)

This message is provided "as is".
 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Exporting data into Excel / Zip file ??? bienwell ASP .Net 1 10-14-2008 08:10 PM
Exporting ALL data into Excel file with Page Navigation in ASP.NET bienwell ASP .Net 2 12-06-2005 08:17 PM
Exporting data into Excel, Word in ASP.NET - Please help !!! bienwell ASP .Net 3 05-17-2005 07:49 PM
Add additional row into header? SK ASP .Net Datagrid Control 4 02-22-2005 11:04 PM
Exporting to Excel via a Modal Dialog with <base target="_self"> in header Rez ASP .Net 2 02-10-2005 08:52 PM



Advertisments