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.

Writing and reading text/CSV files in Java API

Please login with a confirmed email address before reporting spam

I am trying to write and read text or CSV files in the Java API. The documentation is not much help, as only some commands are listed:

  • writeFile()
  • writeCSVFile()

    and also something called

    • openFileStreamWriter()

However, using only one of these does not seem sufficient and given that these are COMSOL API commands only, there is no other documentation source.

Does anyone have any experience with reading and writing with files?

Regards,


1 Reply Last Post 30 déc. 2022, 11:17 UTC−5

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 30 déc. 2022, 11:17 UTC−5

writeCSVFile(pathname+"/"+modelname+"tempdata.txt", MultiDimArray.transp(Globe.tempdata));

writeCSVFile(pathname+"/"+modelname+"tempdata.txt", MultiDimArray.transp(Globe.tempdata));

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.