Organiza tus páginas con colecciones Guarda y categoriza el contenido según tus preferencias.
Propiedades
Este servicio permite que las secuencias de comandos almacenen cadenas como pares clave-valor centrados en una secuencia de comandos, un usuario de una secuencia de comandos o un documento en el que se usa un complemento de editor. Para obtener más información sobre cuándo usar cada tipo de propiedad, consulta la guía del servicio de propiedades.
Permite que las secuencias de comandos almacenen datos simples en pares clave-valor limitados a una secuencia de comandos, un usuario de una secuencia de comandos o un documento en el que se usa un complemento.
Establece todos los pares clave-valor del objeto determinado en la tienda Properties actual y, de manera opcional, borra todas las demás propiedades de la tienda.
Obtiene un almacén de propiedades (solo para esta secuencia de comandos) al que todos los usuarios pueden acceder dentro del documento, la hoja de cálculo o el formulario abiertos.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Falta la información que necesito","missingTheInformationINeed","thumb-down"],["Muy complicado o demasiados pasos","tooComplicatedTooManySteps","thumb-down"],["Desactualizado","outOfDate","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Problema con las muestras o los códigos","samplesCodeIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-07-26 (UTC)"],[[["\u003cp\u003eThe Properties Service allows scripts to store data as key-value pairs, with different scopes available: script, user, or document.\u003c/p\u003e\n"],["\u003cp\u003eThis service offers classes for managing properties like Properties, PropertiesService, ScriptProperties, and UserProperties, each with its own specific purpose.\u003c/p\u003e\n"],["\u003cp\u003eProperties can be manipulated with methods such as deleting, retrieving by key or in bulk, and setting new values.\u003c/p\u003e\n"],["\u003cp\u003eDifferent property stores can be accessed, including document-specific, script-wide, or user-specific stores, through the PropertiesService class.\u003c/p\u003e\n"]]],[],null,["Properties\n\nThis service allows scripts to store strings as key-value pairs scoped to\none script, one user of a script, or one document in which an\n[editor add-on](/gsuite/add-ons/concepts/types#editor_add-ons) is used.\nFor more information about when to use each type of property, see the\n[guide to the Properties service](/apps-script/guides/properties).\n\nClasses \n\n| Name | Brief description |\n|---------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Properties](/apps-script/reference/properties/properties) | The properties object acts as the interface to access user, document, or script properties. |\n| [PropertiesService](/apps-script/reference/properties/properties-service) | Allows scripts to store simple data in key-value pairs scoped to one script, one user of a script, or one document in which an add-on is used. |\n| [ScriptProperties](/apps-script/reference/properties/script-properties) | Script Properties are key-value pairs stored by a script in a persistent store. |\n| [UserProperties](/apps-script/reference/properties/user-properties) | User Properties are key-value pairs unique to a user. |\n\n[Properties](/apps-script/reference/properties/properties) \n\nMethods\n\n| Method | Return type | Brief description |\n|--------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|\n| [deleteAllProperties()](/apps-script/reference/properties/properties#deleteAllProperties()) | [Properties](/apps-script/reference/properties/properties) | Deletes all properties in the current `Properties` store. |\n| [deleteProperty(key)](/apps-script/reference/properties/properties#deleteProperty(String)) | [Properties](/apps-script/reference/properties/properties) | Deletes the property with the given key in the current `Properties` store. |\n| [getKeys()](/apps-script/reference/properties/properties#getKeys()) | `String[]` | Gets all keys in the current `Properties` store. |\n| [getProperties()](/apps-script/reference/properties/properties#getProperties()) | `Object` | Gets a copy of all key-value pairs in the current `Properties` store. |\n| [getProperty(key)](/apps-script/reference/properties/properties#getProperty(String)) | `String` | Gets the value associated with the given key in the current `Properties` store, or `null` if no such key exists. |\n| [setProperties(properties)](/apps-script/reference/properties/properties#setProperties(Object)) | [Properties](/apps-script/reference/properties/properties) | Sets all key-value pairs from the given object in the current `Properties` store. |\n| [setProperties(properties, deleteAllOthers)](/apps-script/reference/properties/properties#setProperties(Object,Boolean)) | [Properties](/apps-script/reference/properties/properties) | Sets all key-value pairs from the given object in the current `Properties` store, optionally deleting all other properties in the store. |\n| [setProperty(key, value)](/apps-script/reference/properties/properties#setProperty(String,String)) | [Properties](/apps-script/reference/properties/properties) | Sets the given key-value pair in the current `Properties` store. |\n\n[PropertiesService](/apps-script/reference/properties/properties-service) \n\nMethods\n\n| Method | Return type | Brief description |\n|---------------------------------------------------------------------------------------------------------|------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------|\n| [getDocumentProperties()](/apps-script/reference/properties/properties-service#getDocumentProperties()) | [Properties](/apps-script/reference/properties/properties) | Gets a property store (for this script only) that all users can access within the open document, spreadsheet, or form. |\n| [getScriptProperties()](/apps-script/reference/properties/properties-service#getScriptProperties()) | [Properties](/apps-script/reference/properties/properties) | Gets a property store that all users can access, but only within this script. |\n| [getUserProperties()](/apps-script/reference/properties/properties-service#getUserProperties()) | [Properties](/apps-script/reference/properties/properties) | Gets a property store that only the current user can access, and only within this script. |\n\n[ScriptProperties](/apps-script/reference/properties/script-properties) \n\n[UserProperties](/apps-script/reference/properties/user-properties)"]]