Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


How to dynamically set the gridline on when exporting to a excel file?

Posted on 2003-02-25
Medium Priority
Last Modified: 2008-03-17
I have dynamically generated an excel- formated document using jsp. Basically it is a dynamically generated html table and I set the border="0".  However, when I click-open the excel file, the gridline is missing. I tried to set the preference to have the gridline on but still, when the file is opened, gridline is not there.  Is it possible I could add a line of code in my jsp program so that when it is opened in Excel, the gridline will be on?  

Can I also set the font?

Thanks a lot,

Question by:rdong
  • 2
LVL 22

Accepted Solution

Dreamboat earned 150 total points
ID: 8018427
Sounds to me like you need to NOT look at gridlines. Instead, do a Ctrl+A and click the bucket icon and tell it No Fill.

Filling cells makes gridlines disappear (but not borders).

Can you also set the font?
Default font or the font for this file?
Are you exporting it to a new Excel file each time?

Author Comment

ID: 8020003
May be I have not made myself clear.

Ok, I have a jsp program which retrieve data dynamically from a database and export the data to a excel fomat ted file, for the argument's sake, lets say it is "test.xls".  

The problem is  that when I click-opened "test.xls", the gridline does not shown.  I have to manually set it on in Excel.

I am wondering if it is possible to code in the jsp program to set the gridline to be on(NOT in EXCEL).


LVL 22

Expert Comment

ID: 8020038
Sorry, RD. I'm confused. Why would you ask a JSP programming question in the MS Office forum?

I would ask it in the JSP forum at:

You may want to go to community support at:

and ask them to delete your question here.

You might first want to copy your question and ask it in the JSP forum and then ask CS to delete this one.

Good luck!!!
LVL 44

Expert Comment

ID: 9283594
This question has been classified as abandoned.  I will make a recommendation to the moderators on its resolution in the next round.  I would appreciate any comments by the experts that would help me in making a recommendation.

It is assumed that any participant not responding to this request is no longer interested in its final deposition.

If the asker does not know how to close the question, the options are here:


EE Cleanup Volunteer

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
I came across an unsolved Outlook issue and here is my solution.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

572 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