Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 17th, 2003, 03:10 AM
Authorized User
 
Join Date: Sep 2003
Posts: 83
Thanks: 0
Thanked 0 Times in 0 Posts
Default Excel help

Hi everyone,

I am not sure if this belongs to this forum, but here goes:

I am using ASP.NET and Excel as a reporting engine. Based on user selection, I generate some HTML and stream it to the client machine by setting the MIME type to Excel. Everything works fine, I have my tabular data in Excel.

However, I want to format my excel document to have a header and footer. How can I do that using the above method?

Anyone who has any experience with something like this and can offer me some tips, I would be really grateful

Thanks,
Pankaj

 
Old December 17th, 2003, 04:58 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

If you are streaming HTML to the browser (which goes into Excel) you can create a header/footer just like you would if the HTML were going to show up in the browser as plain HTML. It's just that the header and footer will have to be part of the html table. You could create a single cell that spans all the columns and has a larger font size and that should work. Likewise for the footer.

Here's an example:
http://www.geekdork.com/samples/webToExcel.aspx
Click the "Show as plain HTML" link in the spreadsheet for the plain HTML view to see what I'm suggesting.

Peter
------------------------------------------------------
Work smarter, not harder.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in opening excel file in MS Excel 2000 kallol Visual C++ 0 November 16th, 2007 05:48 AM
ASP to Excel - excel output formatting issue mat41 Classic ASP Professional 0 August 13th, 2006 06:41 AM
write multi-sheet Excel w/o Excel.Application manmoth Classic ASP Components 2 November 22nd, 2005 10:56 AM
Excel in win 2000 to excel winxp (excel 2002) Max Excel VBA 3 August 28th, 2003 04:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.