Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

How to export data in excel format?

Please login with a confirmed email address before reporting spam

Hey Ivar,
I want to export my figure into excel format. and replot it in matlab. Is it possible ?
Thank you very much!!

Baofeng

20 Replies Last Post Oct 2, 2014, 8:46 a.m. EDT
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 31, 2012, 4:17 p.m. EDT
Hi

check the export options, you can export as CSV and import directly into matlab, or you dump your data into a COMSOL table, where you can either export it or cut&paste it into excel or another txt file editor

--
Good luck
Ivar
Hi check the export options, you can export as CSV and import directly into matlab, or you dump your data into a COMSOL table, where you can either export it or cut&paste it into excel or another txt file editor -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 31, 2012, 4:46 p.m. EDT
Hey Ivar,
I Right-click the export code, in the OUTPUT settings: there are data format, space dimension, and Geometry level and so on. But I can not find CSV or other codes just as you metioned. Could you please tell me a little bit detailled?

Thank you!
Baofeng

Hey Ivar, I Right-click the export code, in the OUTPUT settings: there are data format, space dimension, and Geometry level and so on. But I can not find CSV or other codes just as you metioned. Could you please tell me a little bit detailled? Thank you! Baofeng

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 1, 2012, 2:34 a.m. EDT
Hi

Check the doc for the different export methods, they differ depending on what you export, be it the geometry, mesh, data set, derived values - table or plot results

one way is to try them all on a simple model, then you know for the next time ;)

And I have not fully understood which one of the exports you are dealing with

--
Good luck
Ivar
Hi Check the doc for the different export methods, they differ depending on what you export, be it the geometry, mesh, data set, derived values - table or plot results one way is to try them all on a simple model, then you know for the next time ;) And I have not fully understood which one of the exports you are dealing with -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 1, 2012, 1:31 p.m. EDT
Hey Ivar,
I wanna export the data of a curve which ploted by COMSOL. AS there are many cases, I wanna plot the curve into one figure for comparison. I don't wheather the COMSOL can do it or not. That's why I want to export the data of all the cases and replot them again in Matlab or Excel.
Could you help me out of it ?

Thanks.

Baofeng
Hey Ivar, I wanna export the data of a curve which ploted by COMSOL. AS there are many cases, I wanna plot the curve into one figure for comparison. I don't wheather the COMSOL can do it or not. That's why I want to export the data of all the cases and replot them again in Matlab or Excel. Could you help me out of it ? Thanks. Baofeng

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 1, 2012, 2:29 p.m. EDT
Hi

if you have made a line plot, either from a Derived Variable => table => plot or from a boundary or edge selection and then plotted some variable from there then you can right click the 1D plot node and select "Add Image to Export" and you will get an "Export image" sub node to export the image as a jpg png, or other image file.

However, if you select the "Results - 1D plot - Table, or Line graph" node and right click and select from that sub level a Add Plot Data to Export" you will get an "Export - Plot" sub node and this allows you to create an interpolated array of ascii text, or csv file or other types

General rule always righ click on al nodes to the lowest, and repeat if you change major elements in the physics, as new items might appear. Warning you can get a bad "tennis elbow" from excesive right clicks (at least I managed last automn) so do not over do it ... :)

--
Good luck
Ivar
Hi if you have made a line plot, either from a Derived Variable => table => plot or from a boundary or edge selection and then plotted some variable from there then you can right click the 1D plot node and select "Add Image to Export" and you will get an "Export image" sub node to export the image as a jpg png, or other image file. However, if you select the "Results - 1D plot - Table, or Line graph" node and right click and select from that sub level a Add Plot Data to Export" you will get an "Export - Plot" sub node and this allows you to create an interpolated array of ascii text, or csv file or other types General rule always righ click on al nodes to the lowest, and repeat if you change major elements in the physics, as new items might appear. Warning you can get a bad "tennis elbow" from excesive right clicks (at least I managed last automn) so do not over do it ... :) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Aug 16, 2012, 8:36 a.m. EDT
Hi,
I have been trying to export my data from a point graph. When I have everything set up and I click on export, I am getting this message:

COMSOL Error

Unknown property.
-Property: spacevars

I hope you can help me.
Thanks
--
Albert
Hi, I have been trying to export my data from a point graph. When I have everything set up and I click on export, I am getting this message: COMSOL Error Unknown property. -Property: spacevars I hope you can help me. Thanks -- Albert

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 1, 2012, 10:36 p.m. EDT

Hi,
I have been trying to export my data from a point graph. When I have everything set up and I click on export, I am getting this message:

COMSOL Error

Unknown property.
-Property: spacevars

I hope you can help me.
Thanks
--
Albert


I also me this problem, which has blocked my work for several days! do you know how to solve it ?
[QUOTE] Hi, I have been trying to export my data from a point graph. When I have everything set up and I click on export, I am getting this message: COMSOL Error Unknown property. -Property: spacevars I hope you can help me. Thanks -- Albert [/QUOTE] I also me this problem, which has blocked my work for several days! do you know how to solve it ?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 1, 2012, 10:37 p.m. EDT

Hi

if you have made a line plot, either from a Derived Variable => table => plot or from a boundary or edge selection and then plotted some variable from there then you can right click the 1D plot node and select "Add Image to Export" and you will get an "Export image" sub node to export the image as a jpg png, or other image file.

However, if you select the "Results - 1D plot - Table, or Line graph" node and right click and select from that sub level a Add Plot Data to Export" you will get an "Export - Plot" sub node and this allows you to create an interpolated array of ascii text, or csv file or other types

General rule always righ click on al nodes to the lowest, and repeat if you change major elements in the physics, as new items might appear. Warning you can get a bad "tennis elbow" from excesive right clicks (at least I managed last automn) so do not over do it ... :)

--
Good luck
Ivar


I have been trying to export my data from a point graph. When I have everything set up and I click on export, I am getting this message:

COMSOL Error

Unknown property.
-Property: spacevars

I hope you can help me.
[QUOTE] Hi if you have made a line plot, either from a Derived Variable => table => plot or from a boundary or edge selection and then plotted some variable from there then you can right click the 1D plot node and select "Add Image to Export" and you will get an "Export image" sub node to export the image as a jpg png, or other image file. However, if you select the "Results - 1D plot - Table, or Line graph" node and right click and select from that sub level a Add Plot Data to Export" you will get an "Export - Plot" sub node and this allows you to create an interpolated array of ascii text, or csv file or other types General rule always righ click on al nodes to the lowest, and repeat if you change major elements in the physics, as new items might appear. Warning you can get a bad "tennis elbow" from excesive right clicks (at least I managed last automn) so do not over do it ... :) -- Good luck Ivar [/QUOTE] I have been trying to export my data from a point graph. When I have everything set up and I click on export, I am getting this message: COMSOL Error Unknown property. -Property: spacevars I hope you can help me.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 26, 2013, 10:53 p.m. EST
Hello Ivar,
Do you know the solution for the error: Unknown property.-Property: spacevars ?

To solve this problem is very important, otherwise, we are not able to export data.

Thanks,
Xiang
Hello Ivar, Do you know the solution for the error: Unknown property.-Property: spacevars ? To solve this problem is very important, otherwise, we are not able to export data. Thanks, Xiang

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 26, 2013, 10:53 p.m. EST
Hi Yuanyang,
Have you got solution for this error?

Thanks,
Xiang
Hi Yuanyang, Have you got solution for this error? Thanks, Xiang

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 26, 2013, 10:55 p.m. EST
Hi Albert,
Have you got solution for this error?

Thanks,
Xiang
Hi Albert, Have you got solution for this error? Thanks, Xiang

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 27, 2013, 4:43 a.m. EST
Hi

I guess that spacevars has something to do with the "space variables" hence for me, x,y,z If you export data that are related to the space variables x,y,z, you must be sure you have selected the correct domains/boundaries ... on which the exported variables have space coordinates and are valid.

But it could be other issues too ... ;)

--
Good luck
Ivar
Hi I guess that spacevars has something to do with the "space variables" hence for me, x,y,z If you export data that are related to the space variables x,y,z, you must be sure you have selected the correct domains/boundaries ... on which the exported variables have space coordinates and are valid. But it could be other issues too ... ;) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 27, 2013, 11:22 a.m. EST
Hi Ivar,
Thanks for your reply. The plot that I exported was the 1D point graph, and space variables are correct and valid. There might be something else there. In the discussion forum, other guys also had this problem, and it seemed it has not been solved yet. I am trying to use comsol with matlab to see if I can export the plot that I want.

Thanks,
Xiang
Hi Ivar, Thanks for your reply. The plot that I exported was the 1D point graph, and space variables are correct and valid. There might be something else there. In the discussion forum, other guys also had this problem, and it seemed it has not been solved yet. I am trying to use comsol with matlab to see if I can export the plot that I want. Thanks, Xiang

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 28, 2013, 1:30 a.m. EST
Hi

only "support" can give the final answer I believe ;)

--
Good luck
Ivar
Hi only "support" can give the final answer I believe ;) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 15, 2013, 8:25 a.m. EST
Hello all,


I am also experiencing this export error with 4.3. For me it looks like a bug...
Whatever it is, there is another way (which works!) to export point data:
Derived value>point evaluation>click the point (if it does not exist you'll have to create it under geometry and re-run the model (unfortunately)) and choose the expression to evaluate>evaluate
Then you can copy/paste or export the table...
That works to plot an expression versus time (for time-dependant) or versus parameter value (parametric sweep)

Hope that helps.

David
Hello all, I am also experiencing this export error with 4.3. For me it looks like a bug... Whatever it is, there is another way (which works!) to export point data: Derived value>point evaluation>click the point (if it does not exist you'll have to create it under geometry and re-run the model (unfortunately)) and choose the expression to evaluate>evaluate Then you can copy/paste or export the table... That works to plot an expression versus time (for time-dependant) or versus parameter value (parametric sweep) Hope that helps. David

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 4, 2013, 4:04 a.m. EST
Hi! I have the same problem while using 4.3 version, even when I use LiveLink with Matlab it does not work and it gives the same error: unknown property: spacevars.
In 4.2 everything works fine.
Did you manage to solve your problem? Could you please give me some hints about it please?
Thank you!
Ana Gaspar
Hi! I have the same problem while using 4.3 version, even when I use LiveLink with Matlab it does not work and it gives the same error: unknown property: spacevars. In 4.2 everything works fine. Did you manage to solve your problem? Could you please give me some hints about it please? Thank you! Ana Gaspar

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 4, 2013, 5:45 a.m. EST
Hi

from my understanding "spacevars are the x,y,z,r could it be that you are missing some references to the spatial variables in one of your calls ?

Now I havent met that error yet ;)

--
Good luck
Ivar
Hi from my understanding "spacevars are the x,y,z,r could it be that you are missing some references to the spatial variables in one of your calls ? Now I havent met that error yet ;) -- Good luck Ivar

Gunnar Andersson COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 4, 2013, 7:59 a.m. EST
This is a bug that was introduced in 4.3. It was fixed in 4.3 Update 2: www.comsol.com/support/updates/comsol43p2/

A workaround if you are using 4.3 and want to export the value of an expression evaluated in a cut point:

- Results > Export: Add Data.
- Change the Data set setting to that it points to the cut point data set.

This is a bug that was introduced in 4.3. It was fixed in 4.3 Update 2: http://www.comsol.com/support/updates/comsol43p2/ A workaround if you are using 4.3 and want to export the value of an expression evaluated in a cut point: - Results > Export: Add Data. - Change the Data set setting to that it points to the cut point data set.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 27, 2014, 10:04 a.m. EDT
Hi
I am using COMSOL 4.3, its version is up to date and I have the same error...

Unknown property
- Property: spacevars

I am using the LiveLink with Matlab and I try to export a result on a cutpoint 1D.
If after I have lunched my model with Matlab, the error occurs, and I try to open it with the COMSOL interface, the model runs normally and I can manually export the results. In my case this is not practical at all...

However, it does not work directly when I use my Matlab script.

Is it another bug?
How can I do to solve it?

Thank you.

Ana Gaspar
Hi I am using COMSOL 4.3, its version is up to date and I have the same error... Unknown property - Property: spacevars I am using the LiveLink with Matlab and I try to export a result on a cutpoint 1D. If after I have lunched my model with Matlab, the error occurs, and I try to open it with the COMSOL interface, the model runs normally and I can manually export the results. In my case this is not practical at all... However, it does not work directly when I use my Matlab script. Is it another bug? How can I do to solve it? Thank you. Ana Gaspar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 2, 2014, 8:46 a.m. EDT
Hey,

I am also curious - is it necessary to use Matlab to export data from COMSOL (and how?) or it can be done directly via COMSOL and put into Excel? Please provide update if you find an answer.

Thanks!

Ivelin
Hey, I am also curious - is it necessary to use Matlab to export data from COMSOL (and how?) or it can be done directly via COMSOL and put into Excel? Please provide update if you find an answer. Thanks! Ivelin

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.