Solved

Automating Excel horizontal page break in Delphi

Posted on 2003-11-28
3
1,168 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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 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

15 Experts available now in Live!

Get 1:1 Help Now