How does SMath read in Excel data syntax?

How does SMath read in Excel data syntax? - Сообщения

#1 Опубликовано: 05.09.2018 22:19:46
Dionysios J. Pantazis

Dionysios J. Pantazis

16 сообщений из 179 понравились пользователям.

Группа: User

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/forum/yaf_postst1860_Xlsx-Import-Export-plugin.aspx but could not find anything.

I feel like I am overlooking something really fundamental.

Any tricks?

Dennis
Join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#2 Опубликовано: 06.09.2018 01:06:20
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

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 ??? .

#3 Опубликовано: 06.09.2018 02:18:10
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1674 понравились пользователям.

Группа: User

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
#4 Опубликовано: 06.09.2018 22:25:55
Dionysios J. Pantazis

Dionysios J. Pantazis

16 сообщений из 179 понравились пользователям.

Группа: User

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
Join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#5 Опубликовано: 06.09.2018 23:38:02
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

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 (19 КиБ) скачан 55 раз(а).
Inst_Colebrook Pipe Data.sm (59 КиБ) скачан 54 раз(а).
#6 Опубликовано: 07.09.2018 00:14:52
Dionysios J. Pantazis

Dionysios J. Pantazis

16 сообщений из 179 понравились пользователям.

Группа: User

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
#7 Опубликовано: 07.09.2018 09:26:37
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

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 (186 КиБ) скачан 42 раз(а).
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений