Re: [ACFUG Discuss] Creating excel file using table data in CF.. but excel borders are missing

2007-11-01 Thread Howard Fore
Why don't you use the XML Spreadsheet format instead? Your example would
look something like this:

?xml version=1.0?
Workbook xmlns=urn:schemas-microsoft-com:office:spreadsheet
 xmlns:o=urn:schemas-microsoft-com:office:office
 xmlns:x=urn:schemas-microsoft-com:office:excel
 xmlns:ss=urn:schemas-microsoft-com:office:spreadsheet
 xmlns:html=http://www.w3.org/TR/REC-html40;
 Worksheet ss:Name=Sheet1
  Table ss:ExpandedColumnCount=3 ss:ExpandedRowCount=8
x:FullColumns=1
   x:FullRows=1
   Row ss:Height=15
CellData ss:Type=StringMonth/Data/Cell
CellData ss:Type=StringQuantity/Data/Cell
CellData ss:Type=StringSales/Data/Cell
   /Row
   Row ss:Height=15
CellData ss:Type=StringJanuary/Data/Cell
CellData ss:Type=Number80/Data/Cell
CellData ss:Type=Number245/Data/Cell
   /Row
   Row ss:Height=15
CellData ss:Type=StringFebruary/Data/Cell
CellData ss:Type=Number100/Data/Cell
CellData ss:Type=Number699/Data/Cell
   /Row
   Row ss:Height=15
CellData ss:Type=StringMarch/Data/Cell
CellData ss:Type=Number230/Data/Cell
CellData ss:Type=Number2036/Data/Cell
   /Row
   Row ss:Height=15
CellData ss:Type=StringTotal/Data/Cell
Cell ss:Formula==SUM(R[-3]C:R[-1]C)Data
ss:Type=Number410/Data/Cell
Cell ss:Formula==SUM(R[-3]C:R[-1]C)Data
ss:Type=Number2980/Data/Cell
   /Row
   Row ss:Height=15
Cell/
   /Row
   Row ss:Height=15
Cell/
   /Row
   Row ss:Height=15
CellData ss:Type=String /Data/Cell
   /Row
  /Table
 /Worksheet
/Workbook

I don't know what some of that stuff is and if you create the document
yourself in Excel and Save As XML Spreadsheet you'll see more than this. I
edited the file down to the what seemed like the bare minimum.

On 11/1/07, Ajas Mohammed [EMAIL PROTECTED] wrote:
 Hi,

 I saw an online example of creating excel file using table data.
Everything
 is working perfect, but the problem is that the borders which are usually
 shown in excel file is missing. I tried setting table border=1 but this
 results in only the result shown in borders in excel file.

 I need to show the result with excel borders i.e. borders all the way
which
 is norm for any excel file. If you copy the result set shown in excel by
 this code i.e. select all, copy and then paste the contents into a new
excel
 file, then it looks more like an excel file and thats the look the client
 needs. Makes sense? Please look at snapshot.

 Here is the code :


 Code:head
meta http-equiv=Content-Type content=text/html;
 charset=iso-8859-1 /
titleUntitled
 Document/title
/head

body

cfheader name=Content-Disposition
 value=inline; filename=acmesalesQ1.xls
cfcontent
 type=application/vnd.msexcel

table border=2
 trtdMonth/tdtdQuantity/tdtd$ Sales/td/tr
 trtdJanuary/tdtd80/tdtd $245/td/tr
 trtdFebruary/tdtd100/tdtd$699/td/tr
 trtdMarch/tdtd230/tdtd $2036/td/tr
 trtdTotal/tdtd=Sum(B2..B4)/tdtd=Sum(C2..C4)/td/tr
 /table

/body
 any suggestions how I can get that excel look with cell borders all the
way?

 --
 Ajas Mohammed /
 http://ajashadi.blogspot.com
 No matter what, find a way. Because thats what winners do.
 You can't improve what you don't measure.
 Quality is never an accident; it is always the result of high intention,
 sincere effort, intelligent direction and skillful execution; it
represents
 the wise choice of many alternatives.
 Live as if you were to die tomorrow. Learn as if you were to live
forever.
 -
 Annual Sponsor - Figleaf Software

 To unsubscribe from this list, manage your profile @
 http://www.acfug.org?fa=login.edituserform

 For more info, see http://www.acfug.org/mailinglists
 Archive @
 http://www.mail-archive.com/discussion%40acfug.org/
 List hosted by FusionLink
 -



-- 
Howard Fore, [EMAIL PROTECTED]
Whether you believe you can do a thing or not, you are right. -- Henry
Ford



-
Annual Sponsor FigLeaf Software - http://www.figleaf.com

To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-



Re: [ACFUG Discuss] Creating excel file using table data in CF.. but excel borders are missing

2007-11-01 Thread shawn gorrell
Howard beat me to it.

Doing it with html tables is dead as Disco. First thing to do is create a 
spreadsheet that looks exactly like you want it to look like and put in some 
dummy data. Save it as the XML spreadsheet format then you can use it instead 
of using html and still output it with cfcontent. Looks way better than the old 
school approach. 

- Original Message 
From: Howard Fore [EMAIL PROTECTED]
To: discussion@acfug.org
Sent: Thursday, November 1, 2007 5:21:11 PM
Subject: Re: [ACFUG Discuss] Creating excel file using table data in CF.. but 
excel borders are missing


Why don't you use the XML Spreadsheet format instead? Your example would look 
something like this:

?xml version=1.0?
Workbook xmlns=urn:schemas-microsoft-com:office:spreadsheet

 xmlns:o=urn:schemas-microsoft-com:office:office
 xmlns:x=urn:schemas-microsoft-com:office:excel
 xmlns:ss=urn:schemas-microsoft-com:office:spreadsheet
 xmlns:html=
http://www.w3.org/TR/REC-html40;
 Worksheet ss:Name=Sheet1
  Table ss:ExpandedColumnCount=3 ss:ExpandedRowCount=8 x:FullColumns=1
   x:FullRows=1

   Row ss:Height=15
CellData ss:Type=StringMonth/Data/Cell
CellData ss:Type=StringQuantity/Data/Cell

CellData ss:Type=StringSales/Data/Cell
   /Row
   Row ss:Height=15
CellData ss:Type=StringJanuary/Data/Cell

CellData ss:Type=Number80/Data/Cell
CellData ss:Type=Number245/Data/Cell
   /Row
   Row ss:Height=15

CellData ss:Type=StringFebruary/Data/Cell
CellData ss:Type=Number100/Data/Cell
CellData ss:Type=Number699/Data/Cell

   /Row
   Row ss:Height=15
CellData ss:Type=StringMarch/Data/Cell
CellData ss:Type=Number230/Data/Cell

CellData ss:Type=Number2036/Data/Cell
   /Row
   Row ss:Height=15
CellData ss:Type=StringTotal/Data/Cell

Cell ss:Formula==SUM(R[-3]C:R[-1]C)Data 
ss:Type=Number410/Data/Cell
Cell ss:Formula==SUM(R[-3]C:R[-1]C)Data 
ss:Type=Number2980/Data/Cell

   /Row
   Row ss:Height=15
Cell/
   /Row
   Row ss:Height=15
Cell/
   /Row
   Row ss:Height=15

CellData ss:Type=String /Data/Cell
   /Row
  /Table
 /Worksheet
/Workbook
 

I don't know what some of that stuff is and if you create the document yourself 
in Excel and Save As XML Spreadsheet you'll see more than this. I edited the 
file down to the what seemed like the bare minimum.


On 11/1/07, Ajas Mohammed [EMAIL PROTECTED] wrote:
 Hi,
 
 I saw an online example of creating excel file using table data. Everything
 is working perfect, but the problem is that the borders which are usually

 shown in excel file is missing. I tried setting table border=1 but this
 results in only the result shown in borders in excel file. 
 
 I need to show the result with excel borders i.e
. borders all the way which
 is norm for any excel file. If you copy the result set shown in excel by
 this code i.e. select all, copy and then paste the contents into a new excel
 file, then it looks more like an excel file and thats the look the client

 needs. Makes sense? Please look at snapshot. 
 
 Here is the code :
 
 
 Code:head
meta http-equiv=Content-Type content=text/html;
 charset=iso-8859-1 /

titleUntitled
 Document/title
/head

body

cfheader name=Content-Disposition
 value=inline; filename=acmesalesQ1.xls
cfcontent

 type=application/vnd.msexcel

table border=2
 trtdMonth/tdtdQuantity/tdtd$ Sales/td/tr
 trtdJanuary/tdtd80/tdtd $245/td/tr

 trtdFebruary/tdtd100/tdtd$699/td/tr
 trtdMarch/tdtd230/tdtd $2036/td/tr
 trtdTotal/tdtd=Sum(B2..B4)/tdtd=Sum(C2..C4)/td/tr

 /table 

/body
 any suggestions how I can get that excel look with cell borders all the way?
  
 -- 
 Ajas Mohammed /
 
http://ajashadi.blogspot.com
 No matter what, find a way. Because thats what winners do. 
 You can't improve what you don't measure. 
 Quality is never an accident; it is always the result of high intention,

 sincere effort, intelligent direction and skillful execution; it represents
 the wise choice of many alternatives. 
 Live as if you were to die tomorrow. Learn as if you were to live forever.

 -
 Annual Sponsor - Figleaf Software 
 
 To unsubscribe from this list, manage your profile @ 
 
http://www.acfug.org?fa=login.edituserform 
 
 For more info, see http://www.acfug.org/mailinglists 
 Archive @
 
http://www.mail-archive.com/discussion%40acfug.org/ 
 List hosted by FusionLink 
 -
 


-- 
Howard Fore, 
[EMAIL PROTECTED]
Whether you believe you can do a thing or not, you are right. -- Henry Ford
 





-

Annual Sponsor - Figleaf Software



To unsubscribe from this list, manage your profile @ 

http://www.acfug.org?fa=login.edituserform



For more info, see http://www.acfug.org/mailinglists

Archive @ http://www.mail-archive.com/discussion%40acfug.org/

List hosted by FusionLink

-