CFD Online Logo CFD Online URL
Home > Forums > Mesh Generation & Pre-Processing Software > ANSA

Ansa Scripting (Open Excel/.txt file)

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   May 25, 2018, 14:11
Default Ansa Scripting (Open Excel/.txt file)
New Member
Join Date: May 2018
Posts: 2
Rep Power: 0
gohwaikien is on a distinguished road

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?
gohwaikien is offline   Reply With Quote

Old   September 3, 2018, 09:46
New Member
Join Date: Sep 2016
Posts: 9
Rep Power: 5
acurley31 is on a distinguished road
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.

# 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)

# Importing ansa.utils
from ansa import utils

xl_element = utils.XlsxOpen(filename)
acurley31 is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] groovyBC in openFOAM-2.0 for parabolic velocity bc ofslcm OpenFOAM Community Contributions 25 March 6, 2017 10:03
[] Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation 225 August 25, 2015 19:43
Custom Thermophysical Properties wsmith02 OpenFOAM 3 July 27, 2015 05:37
[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

All times are GMT -4. The time now is 14:17.