<κλάση header="doc-nav" aria-label="Πλοήγηση τεκμηρίωσης"> Τεκμηρίωση HotXLS <κλάση nav="doc-links"> Περιεχόμενα Αρχική Επισκόπηση TXLSWorksheet <κλάση div="nav topic-quick-nav" aria-label="Topic shortcuts"> Αρχική Περιεχόμενα Επισκόπηση

SelectAreas μέθοδος

<κλάση div="indent"> <κλάση div="txt"> Selects one or more A1-style ranges on a classic XLS worksheet and writes a multi-area Selection record when needed

Σύνταξη

<κλάση pre="code"> function SelectAreas(const Areas: array of WideString): Integer; overload; function SelectAreas(const Areas: array of WideString; ActiveAreaIndex: Integer): Integer; overload;

Παράμετροι

<κλάση table="synd"> <κλάση td="syni">Areas <κλάση td="synid">One or more A1-style cell or range references, such as 'A1:B2' or 'D4' <κλάση td="syni">ActiveAreaIndex <κλάση td="synid">0-based index of the active area. If omitted, the first area is active

Return value

<κλάση div="txt"> Επιστρέφει 1 when the selection is accepted, or -1 when the area list is empty, the active index is invalid, or any A1 reference cannot be parsed

Παράδειγμα

<κλάση pre="code"> Workbook.Sheets[1].SelectAreas( ['A1:B2', 'D4'], 1);

Δείτε επίσης

<κλάση div="txt"> κλάση TXLSWorksheet
TXLSWorksheet.Selectionιδιότητα
TXLSWorksheet.Selectμέθοδος <κλάση footer="reference-footer">Copyright © 2010-2026 losLab Software