{"id":2086,"date":"2026-05-26T15:22:58","date_gmt":"2026-05-26T07:22:58","guid":{"rendered":"https:\/\/xlwings.net\/blog\/?p=2086"},"modified":"2026-03-28T06:18:31","modified_gmt":"2026-03-28T06:18:31","slug":"how-to-use-applicationdisplayfullscreen-in-the-xlwings-api-way","status":"publish","type":"post","link":"https:\/\/xlwings.net\/blog\/how-to-use-applicationdisplayfullscreen-in-the-xlwings-api-way\/","title":{"rendered":"How to use Application.DisplayFullScreen in the xlwings API way"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The <strong>DisplayFullScreen<\/strong> property of the <strong>Application<\/strong> object in Excel is a Boolean value that controls whether the Excel application window is displayed in full-screen mode. When set to <code>True<\/code>, Excel maximizes the window to occupy the entire screen, hiding elements such as the ribbon, formula bar, and status bar to provide a larger workspace for viewing or presenting data. This can be particularly useful for creating distraction-free dashboards, presentations, or when working with large datasets that require maximum screen real estate. Conversely, setting it to <code>False<\/code> restores the normal window view with all interface elements visible.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In xlwings, this property is accessed through the <code>app<\/code> object, which represents the Excel application. The syntax for getting or setting the DisplayFullScreen property is straightforward, as it behaves like a standard property in Python.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Syntax:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Get the current state:<\/strong> <code>app.api.DisplayFullScreen<\/code><\/li>\n\n\n\n<li><strong>Set to full-screen mode:<\/strong> <code>app.api.DisplayFullScreen = True<\/code><\/li>\n\n\n\n<li><strong>Exit full-screen mode:<\/strong> <code>app.api.DisplayFullScreen = False<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Parameters:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>There are no explicit parameters for this property; it is a simple Boolean attribute. The value can be either <code>True<\/code> (to enable full-screen) or <code>False<\/code> (to disable it).<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example Usage:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here are a few practical examples demonstrating how to use the DisplayFullScreen property with xlwings:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Enabling Full-Screen Mode:<\/strong><br>This code snippet launches Excel, opens a workbook, and switches to full-screen mode.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>import xlwings as xw\napp = xw.App(visible=True)\nworkbook = app.books.open('example.xlsx')\napp.api.DisplayFullScreen = True<\/code><\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Toggling Full-Screen Mode:<\/strong><br>This example shows how to check the current state and toggle it based on user input or a condition.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>import xlwings as xw\napp = xw.App(visible=True)\nworkbook = app.books.add()\n# Check if currently in full-screen\nif app.api.DisplayFullScreen:\n    print(\"Currently in full-screen mode. Exiting...\")\n    app.api.DisplayFullScreen = False\nelse:\n    print(\"Switching to full-screen mode...\")\n    app.api.DisplayFullScreen = True<\/code><\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong>Disabling Full-Screen on Workbook Close:<\/strong><br>This ensures that full-screen mode is turned off when closing the workbook, restoring the normal Excel interface.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>import xlwings as xw\napp = xw.App(visible=True)\nworkbook = app.books.open('data.xlsx')\napp.api.DisplayFullScreen = True\n# Perform some operations...\nworkbook.save()\napp.api.DisplayFullScreen = False # Exit full-screen before closing\nworkbook.close()\napp.quit()<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The **DisplayFullScreen** property of the **Application** object in Excel is a Boolean value that co&#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-2086","post","type-post","status-publish","format-standard","hentry","category-xlwings-api-reference"],"_links":{"self":[{"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts\/2086","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=2086"}],"version-history":[{"count":1,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts\/2086\/revisions"}],"predecessor-version":[{"id":3192,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts\/2086\/revisions\/3192"}],"wp:attachment":[{"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/media?parent=2086"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/categories?post=2086"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/tags?post=2086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}