# ExcelInterop vs OpenXML in CPython3

**URL:** <https://forum.dynamobim.com/t/excelinterop-vs-openxml-in-cpython3/87171>\
**Category:** Developers\
**Tags:** excel\
**Created:** [March 9, 2023, 5:05pm UTC](https://forum.dynamobim.com/t/excelinterop-vs-openxml-in-cpython3/87171 "2023-03-09T17:05:53Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![c.poupin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/c.poupin/32/89152_2.png) [@c.poupin](https://forum.dynamobim.com/u/c.poupin)\
**Post date:** [March 9, 2023, 8:42pm UTC](https://forum.dynamobim.com/t/excelinterop-vs-openxml-in-cpython3/87171/4 "2023-03-09T20:42:06Z")

</div>

Hi,  
you can use Excel Interrop with CPython3/PythonNet but need to cast each object to the correct Interface

a small example here

> [@Get Excel sheets names](https://forum.dynamobim.com/t/get-excel-sheets-names/80830/7):
>
> Hello, using COM objects is more difficult with PythonNet, here some solutions without Excel Interrop using OpenXml (Dynamo has integrated this lib since 2.10, need to be confirm) import sys import clr import System from System import Array from System.Collections.Generic import List, IList, Dictionary clr.AddReference('DocumentFormat.OpenXml') import DocumentFormat from DocumentFormat.OpenXml import \* from DocumentFormat.OpenXml.Packaging import \* from DocumentFormat.OpenXml.Spre…

for OpenXML, you can find many examples in GitHub in C# _(but the portage to Python is not simple)_

[https://github.com/search?l=C%23&q=OpenXml+CellReference&type=Code](https://github.com/search?l=C%23&q=OpenXml+CellReference&type=Code)

> [@Ben\_Osborne1](#):
>
> I am frankly not wanting to go the route of using any non-built in 3rd party libraries

I understand the argument, but if you can, take a look at the Python libraries pandas and openpyxl

_you can also install the IronPython package_

---

_[View the full topic](https://forum.dynamobim.com/t/excelinterop-vs-openxml-in-cpython3/87171)._
