Some instructions in FWH to handle an Excel or a Word file

Post Reply
User avatar
driessen
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Some instructions in FWH to handle an Excel or a Word file

Post by driessen »

Hello,

I urgently need some instructions to handle an excel file.

1. How do I select a page in an Excel file from a FWH-application?
2. How do I add a line or a columns in an Excel file from a FWH-application?

I also need an instrution for word.

How do I set tab stop (right and left) in a document from a FWH-application?

Thank you very much in advance for any help.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.09 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
cnavarro
Posts: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: Some instructions in FWH to handle an Excel or a Word file

Post by cnavarro »

Look

viewtopic.php?f=6&t=34833&p=207062&hilit=oSheet#p207062

and search into this link and all forum oSheet
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
driessen
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Some instructions in FWH to handle an Excel or a Word file

Post by driessen »

Cristobal,

Thanks a lot for your reply.

Unfortunately this link is in Spanish. And I don't speak one single word of Spanish.

This link is a good start. Any idea for the rest?
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.09 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
cnavarro
Posts: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: Some instructions in FWH to handle an Excel or a Word file

Post by cnavarro »

For insert row

Code: Select all | Expand


// select sheet
oSheet   := oExcel:Sheets( 1 )
oSheet:Rows(1).Insert()
oSheet:Columns("D:D"):Insert()

// or with objects range
objRange := oExcel.Range("A1").EntireRow()
objRange:Insert()

objRange := oExcel:Range("C1"):EntireColumn()
objRange:Insert()
 
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
Enrico Maria Giordano
Posts: 8753
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 4 times
Contact:

Re: Some instructions in FWH to handle an Excel or a Word file

Post by Enrico Maria Giordano »

driessen wrote:Hello,

I urgently need some instructions to handle an excel file.

1. How do I select a page in an Excel file from a FWH-application?


Code: Select all | Expand

oExcel:Sheets( cName ):Select()


EMG
User avatar
driessen
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Some instructions in FWH to handle an Excel or a Word file

Post by driessen »

Thanks a lot, guys.
This was the information I was looking for.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.09 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
hua
Posts: 1076
Joined: Fri Oct 28, 2005 2:27 am
Has thanked: 1 time
Been thanked: 1 time

Re: Some instructions in FWH to handle an Excel or a Word file

Post by hua »

There's also an entry on the wiki here.

Though I believe some commands now can be written tidier e.g. oSheet := oExcel:Get("ActiveSheet") can be written as oSheet := oExcel:ActiveSheet nowadays.

Correct me if I'm wrong
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
Post Reply