Defines new nome. Restituisce un
IXLSName interfaccia
Sintassi
funzione aggiungere(nome: Widestring; RefersTo: Widestring):
IXLSName;
funzione aggiungere(nome: Widestring; RefersTo: Widestring; Visible: Booleano):
IXLSName;
funzione aggiungere(nome: Widestring; SheetName: Widestring; riga: Intero; Col: Intero):
IXLSName;
funzione aggiungere(nome: Widestring; SheetName: Widestring; Row1: Intero; Col1: Intero; Row2: Intero; Col2: Intero):
IXLSName;
| Name |
Required Widestring. testo use as nome. Names cannot include spaces e cannot look like cella references |
| RefersTo |
Required Widestring. Describes what nome refers (usando A1-stile notazione) |
| Visible |
Optional Booleano. True define nome normally. False define nome as hidden nome (che è, it doesn't appear in either Define nome, Paste nome, o Goto dialog box). valore predefinito è True |
| SheetName |
Required Widestring. foglio di lavoro che owns target cella o intervallo |
| Row |
Required Intero. uno-basato riga per single-cella target |
| Col |
Required Intero. uno-basato colonna per single-cella target |
| Row1, Col1, Row2, Col2 |
Required Integers. uno-basato riga e colonna coordinates per rectangular target intervallo |
Esempio
Questo esempio aggiunge new defined nome per cartella di lavoro e use questo nome nell'intervallo cella formula
Workbook.Names.Add('MyName','=Sheet1!$F$10:$H$20');
Workbook.Sheets[1].Cells[3,4].Formula := '=SUM(MyName)';
Questo esempio creates single-cella e intervallo names da foglio di lavoro coordinates
Workbook.Names.Add('InputCell','Sheet1',2,3);
Workbook.Names.Add('InputBlock','Sheet1',4,2,6,5);
Questo esempio aggiunge new defined nome per foglio di lavoro uno e use questo nome nell'intervallo cella formula
Workbook.Sheets[1].Names.Add('MyName','=Sheet1!$F$10:$H$20');
Workbook.Sheets[2].Cells[3,4].Formula := '=SUM(Sheet1!MyName)';
Vedere anche