Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline sinneD  
#1 Posted : 06 September 2018 04:19:46(UTC)
sinneD


Rank: Advanced Member

Groups: Registered
Joined: 12/03/2011(UTC)
Posts: 101
Location: Chicago

Was thanked: 16 time(s) in 7 post(s)
Greetings all-

Is there a description somewhere of how SMath reads in cell data from Excel?

I got tripped up trying to use data in cells that were the results of combining cell values both with concatnate() function and by tying to use the =A2&B3$C3 trick to combine cell values. Eventually, I tricked it by using Char(34) for a quote because Excel didn't like a quote within quotes or with escape like this "\"".

I could not tell how SMath was reading in those values- it was reporting that the values were undefined. It seemed to be taking the cell values as equations instead of results. Which in thinking about it is handy when you are trying to pass on equations, but not so muich if you are trying for results.

I thought to manipulate it via var2str() but I could only do that if the data was already imported.

I tried looking at the documentation linked here- https://en.smath.info/fo...mport-Export-plugin.aspx but could not find anything.

I feel like I am overlooking something really fundamental.

Any tricks?

Dennis

Edited by user 06 September 2018 04:31:43(UTC)  | Reason: Not specified

Join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Jean Giraud  
#2 Posted : 06 September 2018 07:06:20(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: sinneD Go to Quoted Post
I feel like I am overlooking something really fundamental.

If you have result(s) from Excel [data table ... ]
that's because you are instructing Excel to do some maths, is it ?
Do the same maths in Smath and get rid of Excel.
Attach your basic project, the maths of it ??? .

Offline Razonar  
#3 Posted : 06 September 2018 08:18:10(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Hi Dennis.

Try to evaluate it symbolically (Ctrl+Dot). The text in the concatenated cell appear as SMath name, but the others cells as usual.

Best regards.

Alvaro.

Clipboard06.jpg
Clipboard05.jpg

Edited by user 06 September 2018 08:55:10(UTC)  | Reason: Not specified

Offline sinneD  
#4 Posted : 07 September 2018 04:25:55(UTC)
sinneD


Rank: Advanced Member

Groups: Registered
Joined: 12/03/2011(UTC)
Posts: 101
Location: Chicago

Was thanked: 16 time(s) in 7 post(s)
Jean-Giraud:

For some reason I though it best to break the work up into 2 different parts taking advantage of each programs's strengths.

In Excel I enter the data as text and want to manipulate it there. Excel is a little bit easier workflow wise to move and traverse the cells to edit the text. Cells in blue are user entered. The ones in black are the result of some manipulation. There is much repetition in these calculations.
Then I import it into SMath for the heavy lifting. For some reason I am under the impression that text operations in SMath are also inefficient and take a long time to do comparatively. Doing the lookups for AISC member properties is another one- in SMath, it spawns another instance of Excel to look up. If I do it in Excel in step one, its a static bit of text (I think). I may be wrong, but I did not think I wanted to repeatedly call a variable/value that was going to be calculated often.

Here are the two ways I came up for workarounds- to use the ASCII reference to quotes then SMath knows it is text, not a variable or definition.

excel-concat1.PNG

So I read that first spreadsheet in and define a matrix "Equip", the call the elements from that to do a bunch of 'work'. I consistently reuse the index value of the item to track it through the calculation process. The results then get passed off to other worksheets or spreadsheets.

excel-concat2.PNG

If you have any suggestions or comments to make this more efficient or by better programming, I would appreciate the guidance.

Dennis

Edited by user 07 September 2018 04:33:03(UTC)  | Reason: Not specified

Join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline Jean Giraud  
#5 Posted : 07 September 2018 05:38:02(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: sinneD Go to Quoted Post
If you have any suggestions or comments to make this more efficient or by better programming, I would appreciate the guidance.

Dennis


Microsoft gave me the solution, simple: I was using Excel Win_me [graphs, some maths columns,
plenty of Engineering documents]. Switched to XP Home ... all my Win_me down the drain, Thanks Bill !
In that period, I purchased Mathcad 8 Pro ... Good bye Excel, Power Point, Word ...
Storing some data in Excel after calculated from Smath is the right way to me.
The other way around: calling stuff from Excel to Smath does not make sense to me
from the Engineering aspect, whereas Excel is not a CAS [Computer Algebra system].
Smath Data Table is a good companion, very demanding to compose.

What's most interesting from Smath is that you can tabulate from what you have solved.
Colebrook MOODy & Pipe Data are typical of stand alone Smath work flow...

Cheers ... Jean

Inst_Colebrook MOODY.sm (20kb) downloaded 30 time(s).
Inst_Colebrook Pipe Data.sm (60kb) downloaded 28 time(s).
Offline sinneD  
#6 Posted : 07 September 2018 06:14:52(UTC)
sinneD


Rank: Advanced Member

Groups: Registered
Joined: 12/03/2011(UTC)
Posts: 101
Location: Chicago

Was thanked: 16 time(s) in 7 post(s)
I don't mean to sound ungrateful, but if the matrix editor in SMath was as easier to use to manipulate the element values, I would not use Excel for any of this.

I find it is much more efficient to use the arrow keys to move the cursor around to edit values and be able to copy/paste groups of cells and rows/columns. Excel is the better tool for the job right now. For this application, its nothing more than a text editor. I have not tried it, but I wonder how gsheets might work in conjunction with SMath.

I have tried to make an Excel template to write out the syntax for a complete matrix, but honestly, the excel i/o is simpler to use.

I do dump the output of my result matrices to Excel sheets. It makes writing reports and the like easier by using clipboard data. Trying to copy/paste a matrix from SMAth yeilds the mat(...) code instead of cells in rows/columns.

Thanks for posting the examples. I learned a bunch of stuff from the Colebrook Pipe data page. It has given me a number of ideas that I want to try to use tomorrow.

Dennis
Join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline Jean Giraud  
#7 Posted : 07 September 2018 15:26:37(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: sinneD Go to Quoted Post
I learned a bunch of stuff from the Colebrook Pipe data page.


Essentially, Smath is an advanced CAS equation editor. High quality plot on canvas.
Smath is exceptional for publishing. Mach # exemplifies mostly:
1. Solves on the canvas
2. Integrates on the anvas
3. Easy continued fraction from the keyboard.
Mathcad 11 was mostly used to read Excel data, not the other way around..
Good luck to script a continued fraction in Excel. I have some CF 15 terms long !

Cheers ... Jean

MachSmath.PNG

Inst_Mach Number Pitot.sm (187kb) downloaded 19 time(s).
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.