Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting ASP Generated Excel Page

Status
Not open for further replies.

palagrim

Programmer
Apr 28, 2005
31
0
0
GB
Hi.

I'm having trouble formatting a generated excel page. I'm using

<code>

<% Response.ContentType = "application/vnd.ms-excel" %>

<HTML xmlns:x="urn:schemas-microsoft-com:eek:ffice:excel">
<HEAD>
<style>
<!--table
@page
{
mso-page-orientation: landscape;
mso-header-data:"&CTitle\000ADate\: &D\000APage &P";
}
-->
</style>

[ loop through record set and out put a html table ]

</code>
The page doesn't seem to format to landscape, plus I need the page to print on to one page without the end user having to select Fit-To-Page from the page layout menu.

Does anybody have any ideas?

Thanks in advance.

- Craig.
 
Thanks for that... I managed to come up with a solution in the end. Used CSS to format the text / table so it was nice and small and then used ScriptX (available from to force the page to print on landscape.

Not exactly what I wanted to do - but close enough for the end user.

Which to me is a result. ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top