Solved

Automating Excel horizontal page break in Delphi

Posted on 2003-11-28
3
1,174 Views
Last Modified: 2013-11-22
Hi Experts,

I'm trying to add a horizontal page break in an Excel sheet using OLE automation with Delphi.

I've found (using recording an Excel macro) that the HPageBreaks.Add method should be used. But I can't get this working.

Does anyone ever used this method to insert a horizontal page break in an Excel sheet.

Thanks for any help,
JDN
0
Comment
Question by:JDN
3 Comments
 

Accepted Solution

by:
steveaish earned 125 total points
ID: 10864531
I don't know if this is still open or not but what you need to do is this...

ExcelWorkSheet1.HPageBreaks.Add(IDispatch(ExcelWorkSheet1.Cells.Range['A25', emptyparam]));

This will put in a page break before line 25.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
indy tidtcpclient threading issue 8 63
delphi prevent click fast 2 191
Using idhttp to login to instagram 2 76
Adoquery sql  left join does not work 25 80
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

895 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

14 Experts available now in Live!

Get 1:1 Help Now