Solved

Controlling Excel features over the web

Posted on 2003-12-05
5
301 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
[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
  • 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

Had a business requirement to store the mobile number in an environmental variable. This is just a quick article on how this was done.
An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

738 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