# Is there something like pywin32 in Julia?

**URL:** https://discourse.julialang.org/t/is-there-something-like-pywin32-in-julia/37024
**Category:** General Usage
**Created:** [April 4, 2020, 4:54pm UTC](https://discourse.julialang.org/t/is-there-something-like-pywin32-in-julia/37024 "2020-04-04T16:54:03Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![ellocco](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ellocco/32/31331_2.png) [@ellocco](https://discourse.julialang.org/u/ellocco)
#### Post date: [April 8, 2022, 3:33pm UTC](https://discourse.julialang.org/t/is-there-something-like-pywin32-in-julia/37024/3 "2022-04-08T15:33:35Z")

</div>

Here is my example to use PyCall to open and modify an existing Excel-file via a COM server:

```julia
# Create COM server via Python Interface
# first: install "pywin32" via conda:
# using Conda; Conda.add("pywin32")

using PyCall
using XLSX
pw = pyimport("win32com")
pwc = pyimport("win32com.client")

FN_excel = raw"C:\tmp\MyTest.xlsx";
if ~isfile(FN_excel)
    XLSX.writetable(FN_excel)
end

xlApp = pwc.Dispatch("Excel.Application")
xlApp.Visible = 1
if isfile(FN_excel)
    workBook = xlApp.Workbooks.Open(FN_excel)
else
    error("file \"" * FN_excel * "\" does not exist!\n")
end
workBook.ActiveSheet.Cells(1, 1).Value = "hello world"
workBook.Close(SaveChanges = 1)
xlApp.Quit()

```

I hope it helps others to get started.

---

_[View the full topic](https://discourse.julialang.org/t/is-there-something-like-pywin32-in-julia/37024)._
