Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Ho to save a table whehn I run a Java file simulation?

Please login with a confirmed email address before reporting spam

Hi there,

I am trying to run a java model and would like to save the table.
I did following:
Created the model in Comsol.
Run the simulation.
Created the table.
Evaluated the result in the table.
Saved the model as Java file.
Added in the Java file the line: model.result().table("tbl1").save("Coax_Step_Out.csv");

I compiled the Java file to a Class file.
Run the Class file and after the simulation I got the error:
Cannot open file for writing.
- Filename: E:\Comsol\Coax_Step_out.csv - Table: Table 1

I tried as well
model.result().table("tbl1").saveFile(....)
with different settings but it didn't work as well.

I would appreciate any help.

Regards,
Stefan

0 Replies Last Post Apr 12, 2017, 4:39 a.m. EDT
COMSOL Moderator

Hello D-G-C

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.