List of sheets in a excel-file

Post Reply
Marc Vanzegbroeck
Posts: 1102
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

List of sheets in a excel-file

Post by Marc Vanzegbroeck »

Hi,

Is there a way to have a list of the sheet-names that are present in an excel-file?

Thanks
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
ADutheil
Posts: 352
Joined: Sun May 31, 2009 6:25 pm
Location: Salvador - Bahia - Brazil

Re: List of sheets in a excel-file

Post by ADutheil »

You can try something like this:

FOR nI := 1 TO oExcel:sheets():Count

do_whatever_you_want( oExcel:Worksheets( nI ):name )

NEXT
Regards,

André Dutheil
FWH 13.04 HB 3.2 BCC 5.82 MinGW 4.5.2 MSVS 10
Marc Vanzegbroeck
Posts: 1102
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

Re: List of sheets in a excel-file

Post by Marc Vanzegbroeck »

Thank you André.

It's working fine :)
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Post Reply