Class DataSourceParameter
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
DataSourceParameter
访问现有数据源参数。
仅将此类用于与数据库关联的数据。
详细文档
getName()
获取参数名称。
返回
String
- 参数名称。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eThe \u003ccode\u003eDataSourceParameter\u003c/code\u003e class allows access to existing data source parameters, but should only be used with data connected to a database.\u003c/p\u003e\n"],["\u003cp\u003eThis class provides methods to get the parameter name (\u003ccode\u003egetName()\u003c/code\u003e), the source cell (\u003ccode\u003egetSourceCell()\u003c/code\u003e), and the parameter type (\u003ccode\u003egetType()\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eIf the parameter type is not \u003ccode\u003eDataSourceParameterType.CELL\u003c/code\u003e, \u003ccode\u003egetSourceCell()\u003c/code\u003e will return \u003ccode\u003enull\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Class DataSourceParameter\n\nDataSourceParameter\n\nAccess existing data source parameters.\n\n\n**Only use this class with data that's connected to a database.** \n\n### Methods\n\n| Method | Return type | Brief description |\n|-------------------------------------|------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [getName()](#getName()) | `String` | Gets the parameter name. |\n| [getSourceCell()](#getSourceCell()) | `String` | Gets the source cell the parameter is valued based on, or `null` if the parameter type is not [DataSourceParameterType.CELL](/apps-script/reference/spreadsheet/data-source-parameter-type#CELL). |\n| [getType()](#getType()) | [DataSourceParameterType](/apps-script/reference/spreadsheet/data-source-parameter-type) | Gets the parameter type. |\n\nDetailed documentation\n----------------------\n\n### `get``Name()`\n\nGets the parameter name.\n\n#### Return\n\n\n`String` --- The parameter name.\n\n*** ** * ** ***\n\n### `get``Source``Cell()`\n\nGets the source cell the parameter is valued based on, or `null` if the parameter type is\nnot [DataSourceParameterType.CELL](/apps-script/reference/spreadsheet/data-source-parameter-type#CELL).\n\n#### Return\n\n\n`String` --- The source cell, as specified in A1 notation.\n\n*** ** * ** ***\n\n### `get``Type()`\n\nGets the parameter type.\n\n#### Return\n\n\n[DataSourceParameterType](/apps-script/reference/spreadsheet/data-source-parameter-type) --- The parameter type."]]