Solved

Controlling Excel features over the web

Posted on 2003-12-05
5
299 Views
Last Modified: 2010-04-01
I have an intranet application in JSP deployed on Tomcat server. I am sending a HTML table to an Excel sheet using
<%@ page contentType="application/vnd.ms-excel" %>
(saw it on one of the exisitng ques in experts-exchange, thanks for that)
But I want some added functionality.
I want to control the page setup features. When the user opens the excel sheet he should get

Orientation automatically selected as Landscape.
Scaling fit to one window.
Margin left 0.00
Margin right 0.00

How Can this be done?
Plz help, i'll be extermely grateful.
0
Comment
Question by:feebie23
  • 2
  • 2
5 Comments
 
LVL 15

Accepted Solution

by:
jimmack earned 190 total points
ID: 9887724
I don't think you can do this with the contentType setting.  That is just there to allow a quick and easy way to convert table data to a simple excel sheet.  If you want more control over the data, you'll need to use POI:

http://jakarta.apache.org/poi/
0
 
LVL 14

Assisted Solution

by:kennethxu
kennethxu earned 190 total points
ID: 9891977
jimmack is absolutely right.
Here is some additional information of how to set the print options:
http://jakarta.apache.org/poi/apidocs/org/apache/poi/hssf/usermodel/HSSFPrintSetup.html
let us know if you have further enquires.
0
 

Author Comment

by:feebie23
ID: 9894620
Thank You So Much
0
 

Author Comment

by:feebie23
ID: 9894626
You Guys are doing a great job
;)
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9895041
;-)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Books that can get me started on JAVA 2 104
How can I   ajax html table  rows? 20 78
Unhandled exception type Exception 18 42
login form jsp example 2 35
If you are looking at this article, you have most likely been hit by some version of ransomware and are trying to find out if there is anything you can do, or what way you should react - READ ON!
This article explains the steps required to use the default Photos screensaver to display branding/corporate images
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

765 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