संग्रह की मदद से व्यवस्थित रहें अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
टेक्स्टस्टाइल
किसी सेल में टेक्स्ट की रेंडर की गई स्टाइल.
टेक्स्ट स्टाइल में, उससे जुड़ा RichTextValue हो सकता है. अगर RichTextValue, टेक्स्ट के कई रन में फैला है और किसी टेक्स्ट स्टाइल को पढ़ने के लिए इस्तेमाल किए जाने वाले तरीके के लिए अलग-अलग वैल्यू हैं, तो यह तरीका null दिखाता है. इससे बचने के लिए, RichTextValue.getRuns() तरीके से रिच टेक्स्ट की वैल्यू का इस्तेमाल करके, टेक्स्ट स्टाइल के लिए क्वेरी करें.
टेक्स्ट की फ़ॉन्ट फ़ैमिली दिखाता है. अगर फ़ॉन्ट फ़ैमिली सेट नहीं है या उससे जुड़े RichTextValue में अलग-अलग फ़ॉन्ट फ़ैमिली के कई रन हैं, तो null दिखाता है.
वापसी का टिकट
String — टेक्स्ट की फ़ॉन्ट फ़ैमिली (उदाहरण के लिए, "Arial") या null.
getFontSize()
टेक्स्ट का फ़ॉन्ट साइज़, पॉइंट में दिखाता है. अगर फ़ॉन्ट साइज़ सेट नहीं है या उससे जुड़े RichTextValue में अलग-अलग फ़ॉन्ट साइज़ वाले कई रन हैं, तो null दिखाता है.
वापसी का टिकट
Integer — टेक्स्ट का फ़ॉन्ट साइज़ या null.
getForegroundColorObject()
टेक्स्ट का फ़ॉन्ट कलर दिखाता है. अगर फ़ॉन्ट का रंग सेट नहीं है या उससे जुड़े RichTextValue में अलग-अलग फ़ॉन्ट रंगों के साथ कई रन हैं, तो null दिखाता है.
यह पता लगाता है कि टेक्स्ट बोल्ड है या नहीं. अगर बोल्ड नहीं सेट है या उससे जुड़े RichTextValue में बोल्ड करने की अलग-अलग सेटिंग वाले कई रन हैं, तो null दिखाता है.
वापसी का टिकट
Boolean — सेल बोल्ड है या नहीं या null.
isItalic()
यह पता लगाता है कि सेल इटैलिक है या नहीं. अगर इटैलिक सेट नहीं है या उससे जुड़े RichTextValue में इटैलिक की अलग-अलग सेटिंग वाले कई रन हैं, तो null दिखाता है.
वापसी का टिकट
Boolean — सेल इटैलिक है या नहीं या null.
isStrikethrough()
इससे पता चलता है कि सेल में स्ट्राइकथ्रू है या नहीं. अगर स्ट्राइकथ्रू सेट नहीं है या उससे जुड़े RichTextValue में अलग-अलग स्ट्राइकथ्रू सेटिंग वाले कई रन हैं, तो null दिखाता है.
वापसी का टिकट
Boolean — सेल में स्ट्राइकथ्रू है या नहीं या null.
isUnderline()
इससे पता चलता है कि सेल के नीचे अंडरलाइन है या नहीं. अगर अंडरलाइन करने की सुविधा सेट नहीं है या उससे जुड़े RichTextValue में अंडरलाइन करने की अलग-अलग सेटिंग वाले कई रन हैं, तो null दिखाता है.
वापसी का टिकट
Boolean — सेल के अंडरलाइन होने या न होने की जानकारी या null.
टेक्स्ट का फ़ॉन्ट कलर दिखाता है. अगर फ़ॉन्ट का रंग सेट नहीं है या उससे जुड़े RichTextValue में अलग-अलग फ़ॉन्ट रंगों के साथ कई रन हैं, तो null दिखाता है.
वापसी का टिकट
String — टेक्स्ट का फ़ॉन्ट कलर, हेक्स सीएसएस वैल्यू (उदाहरण के लिए, "#ff0000") या null के तौर पर.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\u003cp\u003e\u003ccode\u003eTextStyle\u003c/code\u003e defines the rendered style of text within a cell in Google Sheets, encompassing attributes like font family, size, color, and formatting.\u003c/p\u003e\n"],["\u003cp\u003eIt can be linked to a \u003ccode\u003eRichTextValue\u003c/code\u003e for more complex formatting but may return \u003ccode\u003enull\u003c/code\u003e for style properties if the \u003ccode\u003eRichTextValue\u003c/code\u003e has multiple runs with differing styles.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use methods like \u003ccode\u003egetFontFamily()\u003c/code\u003e, \u003ccode\u003egetFontSize()\u003c/code\u003e, \u003ccode\u003eisBold()\u003c/code\u003e, etc., to retrieve specific style attributes of the text.\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003eTextStyleBuilder\u003c/code\u003e can be created using the \u003ccode\u003ecopy()\u003c/code\u003e method to facilitate the construction of new text styles based on existing ones.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetForegroundColor()\u003c/code\u003e method is deprecated and should be replaced with \u003ccode\u003egetForegroundColorObject()\u003c/code\u003e to retrieve the font color as a \u003ccode\u003eColor\u003c/code\u003e object.\u003c/p\u003e\n"]]],["TextStyle defines the visual styling of text within a cell. It interacts with RichTextValue, which handles text segments with varied styles. Core actions include: `copy()` which creates a new TextStyleBuilder with the current style, and getter methods such as `getFontFamily()`, `getFontSize()`, `getForegroundColorObject()`, `isBold()`, `isItalic()`, `isStrikethrough()`, and `isUnderline()`, that each retrieve a specific text style property. Most getter methods may return `null` if the property is not set or varies within a RichTextValue.\n"],null,["TextStyle\n\nThe rendered style of text in a cell.\n\nText styles can have a corresponding [RichTextValue](/apps-script/reference/spreadsheet/rich-text-value). If the [RichTextValue](/apps-script/reference/spreadsheet/rich-text-value) spans multiple text runs that have different values for a given text style read\nmethod, the method returns `null`. To avoid this, query for text styles using the Rich Text\nvalues returned by the [RichTextValue.getRuns()](/apps-script/reference/spreadsheet/rich-text-value#getRuns()) method. \n\nMethods\n\n| Method | Return type | Brief description |\n|-----------------------------------------------------------|---------------------------------------------------------------------------|------------------------------------------------------------------------------|\n| [copy()](#copy()) | [TextStyleBuilder](/apps-script/reference/spreadsheet/text-style-builder) | Creates a text style builder initialized with the values of this text style. |\n| [getFontFamily()](#getFontFamily()) | `String` | Gets the font family of the text. |\n| [getFontSize()](#getFontSize()) | `Integer` | Gets the font size of the text in points. |\n| [getForegroundColorObject()](#getForegroundColorObject()) | [Color](/apps-script/reference/spreadsheet/color) | Gets the font color of the text. |\n| [isBold()](#isBold()) | `Boolean` | Gets whether or not the text is bold. |\n| [isItalic()](#isItalic()) | `Boolean` | Gets whether or not the cell is italic. |\n| [isStrikethrough()](#isStrikethrough()) | `Boolean` | Gets whether or not the cell has strikethrough. |\n| [isUnderline()](#isUnderline()) | `Boolean` | Gets whether or not the cell is underlined. |\n\nDeprecated methods\n\n| Method | Return type | Brief description |\n|-----------------------------------------------|-------------|----------------------------------|\n| [getForegroundColor()](#getForegroundColor()) | `String` | Gets the font color of the text. |\n\nDetailed documentation \n\n`copy()` \nCreates a text style builder initialized with the values of this text style.\n\nReturn\n\n\n[TextStyleBuilder](/apps-script/reference/spreadsheet/text-style-builder) --- A builder from this text style.\n\n*** ** * ** ***\n\n`get``Font``Family()` \nGets the font family of the text. Returns `null` if the font family isn't set or the\ncorresponding [RichTextValue](/apps-script/reference/spreadsheet/rich-text-value) has multiple runs with different font\nfamilies.\n\nReturn\n\n\n`String` --- The font family of the text (for example, \"Arial\") or `null`.\n\n*** ** * ** ***\n\n`get``Font``Size()` \nGets the font size of the text in points. Returns `null` if the font size isn't set or\nthe corresponding [RichTextValue](/apps-script/reference/spreadsheet/rich-text-value) has multiple runs with different font\nsizes.\n\nReturn\n\n\n`Integer` --- The font size of the text or `null`.\n\n*** ** * ** ***\n\n`get``Foreground``Color``Object()` \nGets the font color of the text. Returns `null` if the font color isn't set or the\ncorresponding [RichTextValue](/apps-script/reference/spreadsheet/rich-text-value) has multiple runs with different font\ncolors.\n\nReturn\n\n\n[Color](/apps-script/reference/spreadsheet/color) --- The font color of the text or `null`.\n\n*** ** * ** ***\n\n`is``Bold()` \nGets whether or not the text is bold. Returns `null` if bold isn't set or the\ncorresponding [RichTextValue](/apps-script/reference/spreadsheet/rich-text-value) has multiple runs with different bold\nsettings.\n\nReturn\n\n\n`Boolean` --- Whether or not the cell is bold, or `null`.\n\n*** ** * ** ***\n\n`is``Italic()` \nGets whether or not the cell is italic. Returns `null` if italic isn't set or the\ncorresponding [RichTextValue](/apps-script/reference/spreadsheet/rich-text-value) has multiple runs with different italic\nsettings.\n\nReturn\n\n\n`Boolean` --- Whether or not the cell is italic, or `null`.\n\n*** ** * ** ***\n\n`is``Strikethrough()` \nGets whether or not the cell has strikethrough. Returns `null` if strikethrough isn't set\nor the corresponding [RichTextValue](/apps-script/reference/spreadsheet/rich-text-value) has multiple runs with different\nstrikethrough settings.\n\nReturn\n\n\n`Boolean` --- Whether or not the cell has strikethrough, or `null`.\n\n*** ** * ** ***\n\n`is``Underline()` \nGets whether or not the cell is underlined. Returns `null` if underline isn't set or the\ncorresponding [RichTextValue](/apps-script/reference/spreadsheet/rich-text-value) has multiple runs with different underline\nsettings.\n\nReturn\n\n\n`Boolean` --- Whether or not the cell is underlined, or `null`.\n\nDeprecated methods \n\n`get``Foreground``Color()` \n\n**Deprecated.** Replaced by [getForegroundColorObject()](#getForegroundColorObject())\n\nGets the font color of the text. Returns `null` if the font color isn't set or the\ncorresponding [RichTextValue](/apps-script/reference/spreadsheet/rich-text-value) has multiple runs with different font\ncolors.\n\nReturn\n\n\n`String` --- The font color of the text as a hex CSS value (for example, \"#ff0000\") or `null`."]]