How to output data to a csv file

How to output data to a csv file - Syntax for output - Messages

#1 Posted: 2/23/2019 7:30:21 PM
RegCurry

RegCurry

0 likes in 57 posts.

Group: User

I am trying to write data to a csv file. On the forum, I have seen examples of output_CSV and “outputData (subscript CSV)”. I cannot get either to work. My data is a two column matrix.

If this function works in SMath, any help on the correct syntax would be appreciated. Perhaps it requires a plugin. If so where can I get the plugin?

Also,where will the csv file be located?

Thanks much.

Reg
#2 Posted: 2/23/2019 8:38:47 PM
Arie

Arie

93 likes in 285 posts.

Group: User

You can use the data exchange plugin. To install go to Tools->Plugins... -> Click (Local Storage) and select Online Gallery -> Look for "Data Exchange" -> Double Click to install.

A simple example of exporting to CSV is shown below. Note: you will need to save the .sm before exportData function will work.

Screenshot from 2019-02-23 18-35-58.png
csvExport.sm (2 KiB) downloaded 55 time(s).
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#3 Posted: 2/23/2019 9:15:47 PM
RegCurry

RegCurry

0 likes in 57 posts.

Group: User

Thanks again for all your help.

It still does not seem to work for me. I installed the Data Exchange Plugin and used the following syntax.

File not found.File not found.

I keep my .sm files files in the following directory. C:\Users\Reg\Reg Documents\MATH_SMATH

The file was not located here.

It is also not located here: C:\Users\Reg\AppData\Local\Programs\SMath Studio
#4 Posted: 2/23/2019 9:39:04 PM
RegCurry

RegCurry

0 likes in 57 posts.

Group: User

Alyles,

Thanks again. I discovered my issue. The = is a symbolic evaluation.

Thanks,
Reg
#5 Posted: 2/24/2019 10:02:43 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

The = is a symbolic evaluation.


Not quite so ... =1 is logical answer "yes saved"

1. select your matrix in Smsth
2. Copy
3. Paste in Excel LibreOffice

I tried but it pastes as line instead of column.
Never ever used Excel since 2000 !
  • New Posts New Posts
  • No New Posts No New Posts