Solved

Controlling Excel features over the web

Posted on 2003-12-05
5
300 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

Title # Comments Views Activity
Running Java Servlet inside Eclipse Luna 6 168
rebasing and merging used in SCM 1 81
bean mapper frameworks 5 64
maven webservice projet error 6 80
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

735 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