{"id":2089,"date":"2026-05-28T07:29:29","date_gmt":"2026-05-27T23:29:29","guid":{"rendered":"https:\/\/xlwings.net\/blog\/?p=2089"},"modified":"2026-03-28T06:20:58","modified_gmt":"2026-03-28T06:20:58","slug":"how-to-use-applicationdisplaynoteindicator-in-the-xlwings-api-way","status":"publish","type":"post","link":"https:\/\/xlwings.net\/blog\/how-to-use-applicationdisplaynoteindicator-in-the-xlwings-api-way\/","title":{"rendered":"How to use Application.DisplayNoteIndicator in the xlwings API way"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The <code>DisplayNoteIndicator<\/code> property of the <code>Application<\/code> object in Excel is a setting that controls whether comment indicators (small red triangles) are displayed in cells that contain comments. This property is particularly useful for managing the visual clutter in a worksheet, especially when dealing with a large number of comments. By toggling this setting, users can choose to show or hide these indicators, which can improve readability and focus on the data itself. In xlwings, this property is accessed through the <code>Application<\/code> object, allowing for programmatic control over the display of comment indicators across the entire Excel application instance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Syntax in xlwings:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>app.display_note_indicator<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This property is a read\/write Boolean value. When set to <code>True<\/code>, comment indicators are displayed in cells containing comments. When set to <code>False<\/code>, these indicators are hidden. Note that hiding the indicators does not delete the comments themselves; they remain accessible via other means, such as hovering over the cell (if enabled) or through the Review tab in the Excel interface.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Parameters:<\/strong><br>The property does not accept parameters directly. It is a simple Boolean attribute that can be set or retrieved.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example Usage:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a practical example demonstrating how to use the <code>DisplayNoteIndicator<\/code> property in xlwings. This script connects to an existing Excel instance, toggles the display of comment indicators, and prints the current state.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import xlwings as xw\n\n# Connect to the active Excel application\napp = xw.apps.active\n\n# Get the current state of DisplayNoteIndicator\ncurrent_setting = app.display_note_indicator\nprint(f\"Current DisplayNoteIndicator setting: {current_setting}\")\n\n# Toggle the setting: if it's True, set to False, and vice versa\napp.display_note_indicator = not current_setting\nprint(f\"DisplayNoteIndicator toggled to: {app.display_note_indicator}\")\n\n# Example: Hide comment indicators\napp.display_note_indicator = False\nprint(\"Comment indicators are now hidden.\")\n\n# Example: Show comment indicators\napp.display_note_indicator = True\nprint(\"Comment indicators are now visible.\")<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The `DisplayNoteIndicator` property of the `Application` object in Excel is a setting that controls &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"class_list":["post-2089","post","type-post","status-publish","format-standard","hentry","category-xlwings-api-reference"],"_links":{"self":[{"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts\/2089","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/comments?post=2089"}],"version-history":[{"count":2,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts\/2089\/revisions"}],"predecessor-version":[{"id":3198,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts\/2089\/revisions\/3198"}],"wp:attachment":[{"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/media?parent=2089"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/categories?post=2089"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/tags?post=2089"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}