Insertar salto de linea en Excel / Excel line jump
Moderator: Rathinagiri
Insertar salto de linea en Excel / Excel line jump
Hola a todos / Hi all:
Necesito insertar desde mi aplicacion, un salto de linea en una hoja de excel. He buscado en MICROSOFT TIPS AND TRICKS y no he encontrado la solución, alguien sabe como hacerlo?
*************************
I need to insert in my application, an Excel line jump in a spreadsheet. I´ve been seek in MICROSOFT TIPS AND TRICKS and i have not found a solution. Any one here knows how to do it?
Saludos / Regards. Carlos RD.
Necesito insertar desde mi aplicacion, un salto de linea en una hoja de excel. He buscado en MICROSOFT TIPS AND TRICKS y no he encontrado la solución, alguien sabe como hacerlo?
*************************
I need to insert in my application, an Excel line jump in a spreadsheet. I´ve been seek in MICROSOFT TIPS AND TRICKS and i have not found a solution. Any one here knows how to do it?
Saludos / Regards. Carlos RD.
Todo en el Nombre de Jesus / All in the name of Jesus
Carlos RD
Carlos RD
- dhaine_adp
- Posts: 457
- Joined: Wed Aug 06, 2008 12:22 pm
- Location: Manila, Philippines
Re: Insertar salto de linea en Excel / Excel line jump
Hi Carlos,
Would you mind to enlighten us a bit regarding "line jump" or would you like to be in the same cell after your routine fill it out with data?
Regards,
Danny
Would you mind to enlighten us a bit regarding "line jump" or would you like to be in the same cell after your routine fill it out with data?
Regards,
Danny
Regards,
Danny
Manila, Philippines
Danny
Manila, Philippines
Re: Insertar salto de linea en Excel / Excel line jump
Hi, Carlos.
Not exactly sure what you're trying to do, but have you tried using an Excel Macro?
Regards,
CalScot
Not exactly sure what you're trying to do, but have you tried using an Excel Macro?
Regards,
CalScot
Re: Insertar salto de linea en Excel / Excel line jump
thank you dany / cal
"line jump" mmm.....
dany:
I did make an application that creates an Excel Spreadsheet and contains data from row1 to rowN in column A.
This data are not the same type, then when i want to print i need to separate this data in groups.
If one of those groups has only 20 rows, i need in one page those 20 rows.
I explain it right?
calscot:
yes, i did a macro, but the instruction "oExcel:WorkSheets(3):cells(ifila3,ncol):HPageBreaks:Add()" does not work.
some idea?
thanks.
"line jump" mmm.....
dany:
I did make an application that creates an Excel Spreadsheet and contains data from row1 to rowN in column A.
This data are not the same type, then when i want to print i need to separate this data in groups.
If one of those groups has only 20 rows, i need in one page those 20 rows.
I explain it right?
calscot:
yes, i did a macro, but the instruction "oExcel:WorkSheets(3):cells(ifila3,ncol):HPageBreaks:Add()" does not work.
some idea?
thanks.
Todo en el Nombre de Jesus / All in the name of Jesus
Carlos RD
Carlos RD
Re: Insertar salto de linea en Excel / Excel line jump
Hi, Carlos.
Although I used to used to be very familiar with the macro feature in Lotus 1-2-3, I haven't used it so much in Excel (certainly not recently), so I am a bit "rusty".
I can't follow up tonight, but if you haven't posted a resolution by tomorrow, I will try to play around with it to see if I can find something that might help.
If you could post the spreadsheet with some notes ("before & after"?) on what you're trying to do, that might help.
Good luck!
CalScot
Although I used to used to be very familiar with the macro feature in Lotus 1-2-3, I haven't used it so much in Excel (certainly not recently), so I am a bit "rusty".
I can't follow up tonight, but if you haven't posted a resolution by tomorrow, I will try to play around with it to see if I can find something that might help.
If you could post the spreadsheet with some notes ("before & after"?) on what you're trying to do, that might help.
Good luck!
CalScot
Re: Insertar salto de linea en Excel / Excel line jump
I´ve been seeking, but nothing. 
- Attachments
-
- oexcel.jpg (80 KiB) Viewed 5546 times
Todo en el Nombre de Jesus / All in the name of Jesus
Carlos RD
Carlos RD
- dhaine_adp
- Posts: 457
- Joined: Wed Aug 06, 2008 12:22 pm
- Location: Manila, Philippines
Re: Insertar salto de linea en Excel / Excel line jump
Hi Carlos,
Try adapting the code snippet below on your routine:
The best thing with this OLE is that it closely resembles the Harbour Classes. See below the VBA Macro vs. HB code:
It works with MS Excel 2007 and all those that works for me in 2007 is also working at the office which is Excel 2010 without any changes. I hope that works for you too.
Regards,
Danny
Try adapting the code snippet below on your routine:
Code: Select all
oSheet := oExcel:ActiveSheet() // the current active sheet
oSheet:Range("A27"):Activate() // position the cursor to the cell to where the page
// break will occur
oWindow := oExcel:ActiveWindow() // get active window
oWindow:SelectedSheets():HPageBreaks():Add(oSheet:Range("A27")) // set horizontal
// pagebreak
Code: Select all
Range("A18").Select
ActiveWindow.SmallScroll Down:=12
Range("A27").Select
ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell
and in HB/HMG it becomes:
oWindow := oExcel:ActiveWindow()
oWindow:SelectedSheets():HPageBreaks():Add(oSheet:Range("A27"))
and the rest of the code implementation is shown above.
Regards,
Danny
Regards,
Danny
Manila, Philippines
Danny
Manila, Philippines
Re: Insertar salto de linea en Excel / Excel line jump
Hi Danny:
Thanks a lot, i really appreciate your help. It is working.
Regards.
Thanks a lot, i really appreciate your help. It is working.
Regards.
Todo en el Nombre de Jesus / All in the name of Jesus
Carlos RD
Carlos RD
Re: Insertar salto de linea en Excel / Excel line jump
Glad to see it's been resolved!
Thanks Danny!
CalScot
Thanks Danny!
CalScot