{"id":86,"date":"2026-02-27T11:11:30","date_gmt":"2026-02-27T03:11:30","guid":{"rendered":"https:\/\/xlwings.net\/blog\/?p=86"},"modified":"2026-01-17T10:41:29","modified_gmt":"2026-01-17T10:41:29","slug":"how-to-set-face-properties-using-xlwings-transparency","status":"publish","type":"post","link":"https:\/\/xlwings.net\/blog\/how-to-set-face-properties-using-xlwings-transparency\/","title":{"rendered":"How To Set Face Properties Using xlwings? &#8211; Transparency"},"content":{"rendered":"<h2>Method<\/h2>\n<p>shp=sht.api.Shapes.AddShape(1, 200, 50, 200, 100)\u00a0\u00a0\u00a0 #Rectangular area<\/p>\n<p>shp2=sht.api.Shapes.AddShape(9, 150, 70, 200, 100)\u00a0\u00a0\u00a0 #Elliptical area<\/p>\n<p>ff=shp2.Fill<\/p>\n<p>ff.ForeColor.RGB= xw.utils.rgb_to_int((255,0,0))\u00a0\u00a0\u00a0 #Set elliptical area to red<\/p>\n<p>ff.Transparency=0.7\u00a0\u00a0\u00a0 #Transparency 0.7<\/p>\n<h2>Sample Code<\/h2>\n\n\n<pre class=\"wp-block-code\"><code>#Text Properties\n\nimport xlwings as xw    #Import xlwings package\n\napp=xw.App()\nbk=app.books.active   #Get the active workbook\nsht=bk.sheets.active    #Get the active worksheet\n\nsht.api.Range('C3').Value='Font Test123'\nft=sht.api.Range('C3').Font\nft.Name = 'Times New Roman'\nft.ColorIndex = 3\nft.Size = 20\nft.Bold=True\nft.Strikethrough = False\nft.Underline = 5\nft.Italic=True\n\n#bk.save()\n#bk.close()\n#app.kill()<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"830\" height=\"482\" src=\"https:\/\/xlwings.net\/blog\/wp-content\/uploads\/2026\/02\/image-14.png\" alt=\"Set Face Properties Using xlwings? - Transparency\" class=\"wp-image-448\" srcset=\"https:\/\/xlwings.net\/blog\/wp-content\/uploads\/2026\/02\/image-14.png 830w, https:\/\/xlwings.net\/blog\/wp-content\/uploads\/2026\/02\/image-14-300x174.png 300w, https:\/\/xlwings.net\/blog\/wp-content\/uploads\/2026\/02\/image-14-768x446.png 768w\" sizes=\"auto, (max-width: 830px) 100vw, 830px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Method<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-86","post","type-post","status-publish","format-standard","hentry","category-xlwings-shape"],"_links":{"self":[{"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts\/86","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=86"}],"version-history":[{"count":2,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts\/86\/revisions"}],"predecessor-version":[{"id":449,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts\/86\/revisions\/449"}],"wp:attachment":[{"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/media?parent=86"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/categories?post=86"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/tags?post=86"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}