SMath Studio Forum
»
SMath Studio
»
Questions
»
Error at .exe file that import for excel
Rank: Member Groups: Registered
Joined: 29/11/2023(UTC) Posts: 10 Location: Mossoró, RN
|
Hello guys,
I started recently creating SMath .exe files and have had some problems with files that import data from excel. Most recently, i created a script to calculate resistence of Hollow structural Sections. The script imports correctly the data from the excel spreadsheet which contains the database of sections while the .exe show the following error:
"[ERROR] [Utils.OpenWorkbook()] Não foi possível encontrar Planilha auxiliar.xlsx. É possível que ele tenha sido movido, renomeado ou excluído?" , which translates to:
"[ERROR] [Utils.OpenWorkbook()] It wasn't possible to find "Planilha auxiliar.xlsx". Is it possible that it has been moved, renamed or excluded?"
It's weird because the spreadsheet that i created is named "Planilha Auxiliar.xlsx" with an "A", not an "a".
Someone knows what may be happening? I think that maybe i created initially the spreadsheet called "Planilha auxiliar.xlsx" and changed to "Planilha Auxiliar.xlsx" but i don't know why this would be relevant if the script refers to the latter and not to the former.
Thanks in advance.
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,648 Location: Italy Was thanked: 1331 time(s) in 876 post(s)
|
What function/plugin are you using? And how are you referencing the file? (absolute/relative... Please post a small example to understand the context) Windows' filesystem is case insensitive, therefore usually doesn't matter (also the error message might be processed somehow), so the a/A is unlikely to be a real issue. Edited by user 29 November 2023 10:36:39(UTC)
| Reason: Not specified |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Member Groups: Registered
Joined: 29/11/2023(UTC) Posts: 10 Location: Mossoró, RN
|
Thanks Davide, I attached a print showing one portion of the script which references the file, the file containing the error messages and a print of the .exe file. Question.rar (128kb) downloaded 2 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,648 Location: Italy Was thanked: 1331 time(s) in 876 post(s)
|
Thank you. It is the plugin XLSXUpdate. Just to be sure, the excel file is in the same folder as the executable? You might try to pass the function an absolute path concatenating the filename with the path from CurrentDirectory("" . |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
1 user thanked Davide Carpi for this useful post.
|
|
|
Rank: Member Groups: Registered
Joined: 29/11/2023(UTC) Posts: 10 Location: Mossoró, RN
|
Thanks Davide, it worked.
You should consider launching a SMath course. I'd buy it and am sure a lot of others would too.
|
|
|
|
Rank: Member Groups: Registered
Joined: 29/11/2023(UTC) Posts: 10 Location: Mossoró, RN
|
Davide, thinking about it, the problem of this solution is that if i share the .exe file with someone, this person will not be able to use it, since the script won't find the reference.
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,648 Location: Italy Was thanked: 1331 time(s) in 876 post(s)
|
Originally Posted by: Italo Rebouç Davide, thinking about it, the problem of this solution is that if i share the .exe file with someone, this person will not be able to use it, since the script won't find the reference. That's why you use a dynamic absolute path with Current Directory instead of typing manually a static absolute path. In some plugin you don't need this step since it is automated in the backend (If I remember correctly XlsxImportExport should have it implemented), but is not guaranteed in all plugins, because it's not something you notice unless you test the plugin in the viewer. Edited by user 30 November 2023 12:32:41(UTC)
| Reason: Not specified |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Member Groups: Registered
Joined: 29/11/2023(UTC) Posts: 10 Location: Mossoró, RN
|
Hello,
I'm coming back to this thread because now i'm having a similar but different problem. The scripts which were working normally are not anymore. The links to the excel spreadsheets are not working and the following message is showing:
"Index invalid (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))"
Does anyone know what might be causing this?
Thanks in advance.
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Questions
»
Error at .exe file that import for excel
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.