force page break in excel

i am outputing the results of a cfm page into sql, by way of cf header:
     <cfheader name="Content-Disposition" value="inline; filename=payPeriodSummary_#datePart('yyyy', getPayPeriodData.pp_endDate)#_#datePart('m', getPayPeriodData.pp_endDate)#_#datePart('d', getPayPeriodData.pp_endDate)#.xls">
<cfcontent type="text/tabdelimited">

i need to insert a page break every 30 lines.  i tried <br style="page-break-before: always">, but excel doesn't acknowledge it.  how can this be done?
LVL 1
meyerc74Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kkhippleCommented:
have a look at this solution:

Inserting an excel page break as a character in an HTML output file renamed to .xls
http://www.experts-exchange.com/Web/WebDevSoftware/ColdFusion/Q_20838162.html
0
pinaldaveCommented:
Hi meyerc74,
use #chr(13)# at the end instead of br... that is what I do.

Regards,
---Pinal
0
meyerc74Author Commented:
chr(13) is just a carriage return...i need to force a page break, so it will print properly
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

kkhippleCommented:
try chr(12)
0
meyerc74Author Commented:
excel doesn't recognize chr(12)
0
kkhippleCommented:
im not sure then. .  .  i think what you are trying to do will probably be best accomplished by using a COM object.. there seems to be no way to do with your basic HTML

and you're right... EXCEL will not recognize <br style="page-break-before: always">    or any other derivation of it...  
if you do find a means.. please let everyone else know


good luck..
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jerry_PangCommented:
i must agree to use excel com object but i dont recommened to use COM object with Excel,
coldfusion 6 has a nasty bug about excel com object.
i dont know if the bug is solved now.

Using Com object may solve your problem but will also add lots of issue with EXCEL bug.
Bug # 49840
http://www.macromedia.com/support/coldfusion/releasenotes/mx/mx61_fixed_bugs.html#COMFixes

how about generating multiple xls files?
or generating xls files with different sheets? (without using com object ofcourse)
or generating a rtf or doc files or an html file instead of xls file.

i think the other MsOffice COM objects are ok but not excel Com Object.
0
meyerc74Author Commented:
unfortunetly, it has to be excel as the end user has to be able to modify and calculate the values.  this end user is also quite, how say i'll say, computer challenged.

in the intrium i told her how to manual enter page breaks in the desired places.  maybe i will try the com object, my company is abandoning coldfusion for asp.net so we stopped upgrading at 4.5.
0
Jerry_PangCommented:
About the excel bug, it cannot close the excel process, the more you press refresh- the more excel process will be created. you cant end task this excel processes except to restart the computer.
happens only in coldfusionMX.

Checkout this site. VBScript & Excel
http://www.greggriffiths.org/webdev/both/excel/index.html

you can use similar code for coldfusion.

use the HPagebreak.add in excel com object to add pagebreaks.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.