List of sheets in a excel-file

List of sheets in a excel-file

Postby Marc Vanzegbroeck » Sun Jun 17, 2018 12:38 pm

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
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: List of sheets in a excel-file

Postby ADutheil » Sun Jun 17, 2018 1:47 pm

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 + MSVS 10
ADutheil
 
Posts: 368
Joined: Sun May 31, 2009 6:25 pm
Location: Salvador - Bahia - Brazil

Re: List of sheets in a excel-file

Postby Marc Vanzegbroeck » Sun Jun 17, 2018 4:11 pm

Thank you André.

It's working fine :)
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 37 guests