Solved

Automating Excel horizontal page break in Delphi

Posted on 2003-11-28
3
1,193 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month3 days, 15 hours left to enroll

630 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