Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Exporting to Excel, show lines

New Here ,
Mar 10, 2010 Mar 10, 2010

Not sure if this is the right area to post this, so I apologize in advance.

I am exporting query data to excel using the <cfoutput>, <cfsavecontent>  and <cfheader> tags, but when it exports and opens in Excel, there are no gridlines.  It's just a white background.  Is there a way to add these back?

Thanks

689
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 10, 2010 Mar 10, 2010

place your data inside a table tag with border=1

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 11, 2010 Mar 11, 2010

I already have it set to border=1. I get a border around the table, that is

all find and good. The problem is, anywhere outside the table is blank

white. Not even the faint Excel lines that are on by default. Guess it

doesn't look like this is possible.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 11, 2010 Mar 11, 2010

What about if you don't delivery the data as HTML, just delivery it as CVS data?

Or, if you're using CF9, just deliver XLS data.

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 11, 2010 Mar 11, 2010

I'm using cf8. Can you tell me how I would deliver using just csv?

?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 11, 2010 Mar 11, 2010
LATEST

Well I'm glad you deciphered my usage of CVS as CSV... (sorry, was talking about CVS on another thread on another forum a few moments ago)

Actually I was hoping if you served up CSV data as an XLS file Excel would work out what to do, but it doesn't.  You need to serve it up as a CSV file, and that might not work for you.

What about using POI?

http://www.bennadel.com/blog/474-ColdFusion-Component-Wrapper-For-POI-To-Read-And-Write-Excel-Files.htm

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources