EXCEL (2003+) I/O with recalculation and export to PNG

EXCEL (2003+) I/O with recalculation and export to PNG - Uses EXCEL PIA (2003+) to import/export data to and from XLS/XLSX files - Messages

#81 Posted: 6/10/2020 12:59:52 PM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

Wrote


Uni, is there anything i can do on my end for the fix? Havent touched the plugin for years and appreciate the maintenance you have done


Please check that the functions are working as they should.

Russia ☭ forever, Viacheslav N. Mezentsev
#82 Posted: 6/10/2020 1:15:39 PM
Alexander O. Melnik

Alexander O. Melnik

127 likes in 494 posts.

Group: Moderator

Wrote

Wrote


Uni, is there anything i can do on my end for the fix? Havent touched the plugin for years and appreciate the maintenance you have done


Please check that the functions are working as they should.



Noticed two bugs potentially not related to plugin itself:
1. The CurrentDirectory( "" ) function call is ties to .exe and not the directory of the page, which messes up my excel references. Is it possible to force running a one SMath exe per .sm file opened?
2. When wrapped inside a function() cal the plugin does not work, but same code works fine outside of function():

test.xlsx (7 KiB) downloaded 203 time(s).
exportXLSX_1.sm (20 KiB) downloaded 229 time(s).
#83 Posted: 6/10/2020 4:48:32 PM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

When translating numbers to Excel and back, there is a problem with the decimal point. I don’t know yet how to make a replacement, because there is confusion with these signs both in the program and in Excel. Here need to do some research, because I did not study this question.
Russia ☭ forever, Viacheslav N. Mezentsev
#84 Posted: 6/10/2020 5:05:58 PM
Alexander O. Melnik

Alexander O. Melnik

127 likes in 494 posts.

Group: Moderator

Wrote

When translating numbers to Excel and back, there is a problem with the decimal point. I don’t know yet how to make a replacement, because there is confusion with these signs both in the program and in Excel. Here need to do some research, because I did not study this question.



Not seen on my end - this example works fine transferring decimal values back and forth SMath<->EXCEL

SampleHowTo.zip (1 MiB) downloaded 470 time(s).

Can you confirm it does not work for you?
#85 Posted: 6/15/2020 2:56:57 AM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

Wrote

Can you confirm it does not work for you?


This example does not work for me and it is related with the decimal part separator, as I understand it.
Russia ☭ forever, Viacheslav N. Mezentsev
#86 Posted: 1/27/2021 9:47:13 PM
rodp1

rodp1

0 likes in 8 posts.

Group: User

Hi all,

I suspect I'm going about this the wrong way, so any suggestions welcome.

I have the plugin working for import/export. What I need though is for the export from excel to force a recalc of the smath sheet when I update the EXCEL sheet.

What I'm trying to do - have a table of input values in excel, one case per line. I want to increment through that table, use SMATH to solve with the input values and then export the results back to excel on the same line.
#87 Posted: 1/28/2021 4:09:07 AM
rodp1

rodp1

0 likes in 8 posts.

Group: User

Wrote

Hi all,

I suspect I'm going about this the wrong way, so any suggestions welcome.

I have the plugin working for import/export. What I need though is for the export from excel to force a recalc of the smath sheet when I update the EXCEL sheet.

What I'm trying to do - have a table of input values in excel, one case per line. I want to increment through that table, use SMATH to solve with the input values and then export the results back to excel on the same line.



Looks like I need to use the "Run" function, and combine it with reading in the Excel file.

Baby steps

#88 Posted: 1/28/2021 5:00:17 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote


Looks like I need to use the "Run" function, and combine it with reading in the Excel file.

Baby steps



Hi. Well, run() isn't a function for novices. I guess that, given that seems you know how to program in advanced VBA, because you're traying to solve vector equations on it, you can call from a macro in excel an SMath file in "silent" mode, or background, or the correct expression for that. Actually, I don't know how to start SMath in that way, but I'm pretty sure that it is possible. Maybe someone tell us how to do that. The macro then must to wait for an exit code from SMath indicating that ends the process. In your SMath file you can take the data from your excel file and maybe try to update the processed data into excel from SMath, or if you get troubles doing that, you can save the new data into a CSV file and from the excel macro update a query for upload into excel those data.

Code in excel could looks like that, assuming that /BG is the unknow option, in combination with another option, not vbNormalFocus, but this which I remember:

Public Sub CallSMath()
    Dim strProgramName As String
    Dim strArgument As String

    strProgramName = "C:\Program Files\SMath\SMath.exe"
    strArgument = "/BG MyDocPath\mySMathFile.sm"

    Call Shell("""" & strProgramName & """ """ & strArgument & """", vbNormalFocus)

End Sub

Hope that's helps.
Best regards.
Alvaro.
#89 Posted: 1/28/2021 8:59:15 PM
rodp1

rodp1

0 likes in 8 posts.

Group: User

Wrote

Wrote


Looks like I need to use the "Run" function, and combine it with reading in the Excel file.

Baby steps




Hope that's helps.
Best regards.
Alvaro.



Hi Alvaro - thanks for the pointer. I actually managed to get it working using the "run" command, but when I get a chance I'll give this a go as well. If I can go directly from Excel that would avoid a step.

At the moment my tool chain looks like

Excel -> import to a smath sheet 1 -> smath sheet 1 runs sheet 2 -> sheet 2 runs then exports to sheet 1 -> sheet one exports results to excel.

I'd prefer to avoid the excel part, but others who have to use my work seem to like it. It is also easier setting up input tables in Excel, to be fair.
#90 Posted: 5/21/2021 12:07:12 PM
Alvaro Gavilán

Alvaro Gavilán

25 likes in 68 posts.

Group: User

Hello everybody!

It has been a long time without any comment on the forum, but I was using a lot SMath Studio every day of the week, more than Excel.

Now I am writing my final work (civil engineering) and I have a problem that I hope you can solve. In the meantime, I will try other plugins to import my main excel file, but this problem began to happen with the new SS version, 0.99.7808.

HRESULT: 0x800A03EC

File not found. File not found.

I will be thankful to your help, and hope you are doing well!

import test.sm (3 KiB) downloaded 34 time(s).

data.xlsx (8 KiB) downloaded 28 time(s).

Context:

I use SMath to generate a test report ASTM C469-14: Stress-strain curve and modulus of elasticity.
I use CONTROLS compressometers that generates txt files for stress (1 channel) and strain (3 channels).
I have already generated 60 reports (with previous SS stable version), but I need 36 more reports to finish my experimental work.

Report example:

BH25111.pdf (313 KiB) downloaded 44 time(s).
1 users liked this post
#91 Posted: 5/21/2021 1:36:53 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote

...
I have already generated 60 reports (with previous SS stable version), but I need 36 more reports to finish my experimental work.



Hola Alvaro. My recommendation: downgrade to the version which works for your documents, and wait some time for upgrade again.

Mucho éxito con tu tesis.

Un abrazo.
ALvaro.
#92 Posted: 5/21/2021 3:59:15 PM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

SMath Studio compatibility

Plugin updated. Please try.

Changes:

- plug-in corrected to respect latest SMath Studio API changes.
Russia ☭ forever, Viacheslav N. Mezentsev
2 users liked this post
sergio 5/21/2021 4:24:00 PM, Alvaro Diaz Falconi 5/21/2021 8:48:00 PM
#93 Posted: 5/21/2021 6:21:40 PM
Alvaro Gavilán

Alvaro Gavilán

25 likes in 68 posts.

Group: User

WOW! So quick solution!

Thank you uni! It works! And also the excel_IN() function that I use in my report file.

Gracias Alvaro por tu mensaje! Un abrazo! I hope to achieve a good work and share it here in the next months. I followed your recommendation in order to keep working.

Really thank you guys, I missed the SMath forum!
#94 Posted: 5/21/2021 10:25:29 PM
churichuro

churichuro

28 likes in 79 posts.

Group: User

the future is just ahead
the past is only the foundation of the building
evolution does not ask if the lion is
worse than the saber-toothed tiger

evolution just always walks forward.
#95 Posted: 9/18/2021 10:42:36 PM
Ricardo_Herrera

Ricardo_Herrera

1 likes in 8 posts.

Group: User

Greetings to all, thank you very much for this opportunity to be here in this forum,
I have tried to solve this problem, thank you very much for your comments and success to all.
copia.jpg
#96 Posted: 9/20/2021 11:35:22 AM
João Felipe Seráfico Melo

João Felipe Seráfico Melo

7 likes in 62 posts.

Group: User

Ricardo, at first, I would say the issue is the "x" in ".xlsx" being in uppercase,

but I can't make this plugin nor Clipboad Region work after the last update,

so maybe the real plugin are within the plugins themselves.

#97 Posted: 9/20/2021 11:55:25 AM
Ricardo_Herrera

Ricardo_Herrera

1 likes in 8 posts.

Group: User

ERROR-OUT EXCEL.jpgMuchas Gracias por su respuesta, Eng. João Felipe Melo es una sorpresa la respuesta de su persona.
Sigo y veo los videos en su canal YouTube. Mil gracias nuevamente.
Éxitos siempre.


Thank you very much for your response, your response is a surprise.
I follow and watch the videos on your YouTube channel. Thank you again.
Successes always

Muito obrigado pela sua resposta, sua resposta é uma surpresa.
Eu sigo e assisto os vídeos em seu canal no YouTube. Obrigado novamente.
Sucessos sempre.
#98 Posted: 9/20/2021 12:53:08 PM
overlord

overlord

549 likes in 1332 posts.

Group: Moderator

Wrote

Greetings to all, thank you very much for this opportunity to be here in this forum,
I have tried to solve this problem, thank you very much for your comments and success to all.


I couldn't make the plugin work either.
Meanwhile you can install DataExchange plugin.
There is exportData.XLSX() in it.
That function maybe can help you.

Regards

2021-09-20_18-49.png
#99 Posted: 9/20/2021 1:15:24 PM
Ricardo_Herrera

Ricardo_Herrera

1 likes in 8 posts.

Group: User

overlord: Thank you very much for your reply.
The plugin does work.
use "DataExchange plugin",
question:
some replacement for the "Excel_PNG()" plugins
Thank you very much for your support. to all.
#100 Posted: 9/20/2021 1:31:24 PM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

I have not been able to reproduce this problem in my environment. Could you please attach the contents of the XLSXupdate.log file that appears when the program starts?

The path is: %appdata%\SMath\extensions\plugins\e40eaef6-4622-4ef3-ad03-077e8f005bb1\x.x.x.x\ (x.x.x.x - the plugin version)
Russia ☭ forever, Viacheslav N. Mezentsev
  • New Posts New Posts
  • No New Posts No New Posts