Solved

Controlling Excel features over the web

Posted on 2003-12-05
5
291 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
Hyena v12.2 is now available for downloading and is available in English, French, German and Spanish versions.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now