Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Automating Excel horizontal page break in Delphi

Posted on 2003-11-28
3
Medium Priority
?
1,205 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 500 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

721 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