Jump to content

Please help: Interfacing Python with Openoffice Calc

- - - - -

  • Please log in to reply
2 replies to this topic

#1
Alyx_Vance

Alyx_Vance

    Newbie

  • Members
  • Pip
  • 2 posts
Hey guys!

First post here. I'm an engineering student, but I'm on a work term... one of my tasks is to write a IronPython script to acess values in a spreadsheet in Openoffice and import them to ANSYS as design parameters.

I did some coding in C++ before but I'm pretty new to IronPython... I found a lot of tutorials for Excel with ANSYS workbench but nothing for Openoffice.

My main problem is that I want to write a script to acess numbers from a spreadsheet in Openoffice and make that data available for ANSYS to use. I'm not sure where to get started with acessing the spreadsheet values.

Any help you guys could give me would be awesome

Thanks

**Jess**

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
I'm not sure if this is helpful, but an OpenOffice document is just a zip file with some XML files inside it. I wouldn't think it would be too hard to unzip the file, open the XML file of interest, and snag the data you need.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
Alyx_Vance

Alyx_Vance

    Newbie

  • Members
  • Pip
  • 2 posts
yeah, it's a bit helpful. I guess to start I don't need openoffice to be running or updating/calculating anything, as long as I can acess the data in the XML files...although ANSYS works best with csv files

But ideally openoffice calc would be running, and as the user inputs the data, or one or more of the design parameters change, the script would update the parameters in ANSYS.

I know it's kind of a specific question but is anyone familiar with scripting in ANSYS workbench with Ironpython?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users