|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
wkg
Join Date: May 2018
Posts: 2
Rep Power: 0 ![]() |
Hi,
I was trying to open excel file and text file using ANSA scripting with utils.XlsxOpen and it didn't work. Does anyone have any idea? |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Join Date: Sep 2016
Posts: 9
Rep Power: 9 ![]() |
Make sure your import statements are correct. You may also want to check your file path that you are trying to open from within the script to make sure it actually exists.
Code:
# Importing just ansa import os import ansa filename = "/path/to/my/xlsx/file" fileExists = os.path.exists(filename) # Check to make sure the file exists xl_element = ansa.utils.XlsxOpen(filename) ansa.utils.XlsxClose(xl_element) Code:
# Importing ansa.utils from ansa import utils xl_element = utils.XlsxOpen(filename) utils.XlsxClose(xl_element) |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom Thermophysical Properties | wsmith02 | OpenFOAM | 4 | June 1, 2023 14:30 |
[swak4Foam] groovyBC in openFOAM-2.0 for parabolic velocity bc | ofslcm | OpenFOAM Community Contributions | 25 | March 6, 2017 10:03 |
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch | gschaider | OpenFOAM Installation | 225 | August 25, 2015 19:43 |
[swak4Foam] swak4foam building problem | GGerber | OpenFOAM Community Contributions | 54 | April 24, 2015 16:02 |
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 | keepfit | ParaView | 60 | September 18, 2013 03:23 |