# Read Excel file node Opens Excel file

**URL:** <https://forum.dynamobim.com/t/read-excel-file-node-opens-excel-file/7813>\
**Category:** FAQ\
**Created:** [November 29, 2016, 10:34am UTC](https://forum.dynamobim.com/t/read-excel-file-node-opens-excel-file/7813 "2016-11-29T10:34:37Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Raja](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@Raja](https://forum.dynamobim.com/u/Raja)\
**Post date:** [June 30, 2017, 10:11am UTC](https://forum.dynamobim.com/t/read-excel-file-node-opens-excel-file/7813/7 "2017-06-30T10:11:06Z")

</div>

Hi @Atkins14,  
Took so long for me to return to this forum. many thanks for stitching the code, with my basic python knowledge I have edited yours a bit with `True or False` statement , here below.

```
from System.IO import Directory
import re
import time
import sys
sys.path.append('C:\Program Files (x86)\IronPython 2.7\Lib')
import subprocess
import os
import errno
import csv
import clr
clr.AddReferenceByName('Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c')
from Microsoft.Office.Interop import Excel
from Microsoft.Office.Interop.Excel import ApplicationClass
from System.Runtime.InteropServices import Marshal

true_false = IN[0]

def excel_close(_bool):
    if _bool: 
        xlApp = Marshal.GetActiveObject("Excel.Application")	
        xlApp.Visible = True
        xlApp.DisplayAlerts = False
        xlApp.Workbooks.Close()
        xlApp.Quit()
        Check = "Success"
    else:
        Check = "Set the boolean to True"

    return Check

OUT = excel_close(true_false)

```

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/1/b1c129ad842f6c891ec7bbee361aed34f9515a81.gif)

Thanks once again for this working solution.

---

_[View the full topic](https://forum.dynamobim.com/t/read-excel-file-node-opens-excel-file/7813)._
