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

Notification

Icon
Error

Login


3 Pages123>
Options
Go to last post Go to first unread
Offline Davide Carpi  
#1 Posted : 10 June 2013 10:49:00(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
SMath Studio compatibility SMath Viewer compatibility mono compatibility

extension page Sources MIT license


Here there is a plugin to share data between SMath and XLSX Spreadsheets (*.xlsx, *.xlsm).

Plugin UI languages: English Deutsch Italiano Русский Español

PLEASE REPORT IN THIS TOPIC ANY ISSUE.


Best regards

  • requirements: SMath Studio 0.96.4909 or later, .Net Framework 3.5 (Windows) / Latest Mono distributive (Linux);
  • installation: download the plugin from the gallery;
  • documentation: XlsxImportExport_docs.7z (39kb) downloaded 1,281 time(s).;
  • languages: if you want to have a new UI language look into the documentation's Language folder.



Attached below OLD documentation for SMath Studio prior to 0.97.5346 (0.96.4909 <= SS < 0.97.5346)

Edited by user 17 November 2018 20:26:38(UTC)  | Reason: Not specified

File Attachment(s):
XlsxImportExport_docs.7z (38kb) downloaded 1,028 time(s).
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 9 users thanked Davide Carpi for this useful post.
on 10/06/2013(UTC),  on 10/06/2013(UTC),  on 10/06/2013(UTC),  on 10/06/2013(UTC),  on 10/06/2013(UTC),  on 10/06/2013(UTC),  on 17/01/2016(UTC),  on 07/12/2016(UTC),  on 11/01/2018(UTC)

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

Offline Davide Carpi  
#2 Posted : 10 June 2013 12:07:53(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
thank you for the feedback Friends Good


best regards,

Davide
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline genf  
#3 Posted : 10 June 2013 13:45:09(UTC)
genf


Rank: Advanced Member

Groups: Registered
Joined: 10/06/2013(UTC)
Posts: 50
Man
Russian Federation

Was thanked: 6 time(s) in 6 post(s)
How to use this plugin - did not quite understand. Thank you.
Offline Davide Carpi  
#4 Posted : 10 June 2013 13:50:31(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
Originally Posted by: genf Go to Quoted Post
How to use this plugin - did not quite understand. Thank you.

Examples added to the first post (XlsxImportExport_docs.7z - nothing changes in the usage from those contained in the previous Data Exchange plugin) Good

Attached here a pdf to show the expected output.


regards,

w3b5urf3r

Edited by user 10 June 2013 14:01:49(UTC)  | Reason: Not specified

File Attachment(s):
Xlsx Import_Export examples.pdf (63kb) downloaded 1,671 time(s).
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 1 user thanked Davide Carpi for this useful post.
on 10/06/2013(UTC)
Offline mkraska  
#5 Posted : 10 June 2013 14:03:52(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
Originally Posted by: genf Go to Quoted Post
How to use this plugin - did not quite understand. Thank you.

All plugin functions are explained in the function reference part of the handbook (see signature). It is in german, but the examples should be self documenting (most of them in fact taken from Davide's examples)
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 1 user thanked mkraska for this useful post.
on 10/06/2013(UTC)
Offline Ernesto  
#6 Posted : 03 February 2014 06:52:57(UTC)
Ernesto


Rank: Advanced Member

Groups: Registered
Joined: 03/02/2014(UTC)
Posts: 67
Nicaragua

Was thanked: 13 time(s) in 11 post(s)
I tried this plugin out, since importing and exporting to excel would be extremely useful.

However when I try to import a cell with a function referencing another cell, the cell reference is imported (eg: A5*G4), instead of the value of the cell. Is there any way around this?

Also, is it possible to export to an existing excel file, without overwriting it? I tried exporting to an existing file, and everything in the file gets erased, except for the newly exported data.


Thanks,

Ernesto.

Edited by user 03 February 2014 08:42:55(UTC)  | Reason: Not specified

Offline Davide Carpi  
#7 Posted : 03 February 2014 20:56:49(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
I need to see the ClosedXML API references...

About cell's references if I remember correctly there are some limitations (not all the functions are supported and not all the references, f.e. between different sheets) but I can check if something can be made...

For both the things, I'll see what I can do Good

Edited by user 03 February 2014 21:10:44(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
Offline RFreund  
#8 Posted : 06 April 2014 16:49:33(UTC)
RFreund


Rank: Advanced Member

Groups: Registered
Joined: 25/09/2013(UTC)
Posts: 325
United States
Location: IL

Was thanked: 19 time(s) in 17 post(s)
In the example file it is stated
Quote:
import a single cell
(file in the same folder of this sheet; use a relative/absolute path otherwise)


Does this mean if the file is in the same folder as SMath?

It appears that the program looks where the Smath.exe file is stored is that correct?
Thanks

EDIT:

I wanted to use the folder where the calulcation page and the excel sheet was stored. Therefore I should first set CurrentDirectory(DocumentDirectory(""Wink)

Edited by user 06 April 2014 16:54:15(UTC)  | Reason: Not specified

Offline Davide Carpi  
#9 Posted : 06 April 2014 17:48:17(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
Originally Posted by: RFreund Go to Quoted Post
In the example file it is stated
Quote:
import a single cell
(file in the same folder of this sheet; use a relative/absolute path otherwise)


Does this mean if the file is in the same folder as SMath?

It appears that the program looks where the Smath.exe file is stored is that correct?


The "base" path is the path of the worksheet, if available (existing worksheet) otherwise is the user "Documents" folder.
The archive in the first post contains some import/export examples.


BTW the path of the executable has no much interest (in most of the cases the user don't know where it is or needs administration privileges to write inside it)


Best regards,

Davide

Edited by user 06 April 2014 17:51:58(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
Offline mkraska  
#10 Posted : 18 May 2014 18:45:37(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
Is the Excel import meant to be Viewer-safe? I get the attached error message if I try to run a viewer application with excel read. With ods-format the situation is similar.
File Attachment(s):
MB.zip (20kb) downloaded 116 time(s).
mkraska attached the following image(s):
ods.PNG
xlsx.PNG
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Davide Carpi  
#11 Posted : 19 May 2014 01:12:19(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
Originally Posted by: mkraska Go to Quoted Post
Is the Excel import meant to be Viewer-safe? I get the attached error message if I try to run a viewer application with excel read. With ods-format the situation is similar.


To be honest, I've never tried these plugins in SMath Viewer; seems that the external assemblies are not embedded in the Viewer.

As secondary thing reading the ClosedXML/Ionic.Zip licenses I suppose that any Viewer executable shall contains the relative copyright notice, and this actually is not possible (if this is not made by you manually)...

Edited by user 19 May 2014 01:34:42(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
thanks 1 user thanked Davide Carpi for this useful post.
on 19/05/2014(UTC)
Offline mkraska  
#12 Posted : 19 May 2014 21:49:19(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
I try to setup a data browser for use by my colleagues, therefore any hints on how to do viewer-safe data import of spreadsheets are welcome. Perhaps this could be done within excel, but I am not comfortable with it and just use the opportunity to do some SMath testing.
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Davide Carpi  
#13 Posted : 20 May 2014 01:07:46(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
Nice idea...

Added in the BTS as SV-146 and SV-147


Best regards,

Davide
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline msiseminger  
#14 Posted : 05 August 2014 18:56:26(UTC)
msiseminger

Rank: Newbie

Groups: Registered
Joined: 14/07/2014(UTC)
Posts: 1
United States

Was thanked: 1 time(s) in 1 post(s)
Davide,

The issue with "DocumentFormat.OpenXml.dll" not found when you create and run an .exe can be resolved by removing the reference to the .dll from the "References" section in your extention solution. You do not call this .dll anywhere in the extension so it is not needed. When I do this, I no longer get the missing .dll error.

The .exe still does not pull in the Excel spreadsheets I want with the missing .dll error fixed. I did do further investigation and the .exe program can not handle even a simple mat() function by itself with no other references. This lead me to believe that the .exe program is at issue and not your extension.

Mike
thanks 1 user thanked msiseminger for this useful post.
on 05/08/2014(UTC)
Offline Davide Carpi  
#15 Posted : 07 March 2015 16:05:02(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
PLUGIN UPDATED

- ImportData.XLSX now get results where cells references other cells;
- fixed export on SMath Viewer;
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Alex M.  
#16 Posted : 11 March 2015 21:26:49(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
I figured this conversation is best to be continued here

Originally Posted by: w3b5urf3r_reloaded Go to Quoted Post
COM plugins are a unexplored field for me. My first idea is to have something like a Calculate.MSExcel("file") / Calculate.LOCalc("file") functions; I don't know if this is possible for the whole document, anyway should be possible for a range Calculate.XYZ("file","cells").

Base documentation:
- for excel: How to: Run Excel Calculations Programmatically
- for LO: SDK 4.3: Common Language Infrastructure (CLI) examples


Is it possible to run visual basic script from your plugin? I have come up with (pieced together from numerous online sources) a .vbs file that will update (in background) all the XLSX files in the directory it is run from (it will actually run a background EXCEL process that can be tasked to do anything excel can). If this or similar could be incorporated in your plugin I can see following happening:

1. Modify "input" xlsx workbook using your data exchange plugin
2. Run .vbs script that will recalculate/save all workbooks linked to input work book (I wonder if it is possible to somehow start the sript from within Smath)
3. Export cell range from desired workbook

I am sure with .vbs there is a way to perform all input - calculations - output strictly in memory, so no files need to be saved unless desired. I am not sure, however, if it is something that can be used by a Smath Studio plugin.

Best regards

Edited by user 11 March 2015 22:37:13(UTC)  | Reason: Not specified

File Attachment(s):
Update - CurrentDir - All.vbs.txt (1kb) downloaded 101 time(s).
SpreadSheet IOxlsx.7z (12kb) downloaded 108 time(s).
Offline Davide Carpi  
#17 Posted : 25 June 2015 21:39:07(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
PLUGIN UPDATED SMath Studio 0.97.5581

- import data: fixed bug when quotation mark (") is used in a cell, f.e. for inches measurements. Now this character is converted in the "Double Prime" character (″) [many thanks to Don Bollard for pointing out this bug];
- import data: importData.XLSX(3) now accepts a range of cells as third argument (f.e. "A3:B12");

Edited by user 26 June 2015 00:54:03(UTC)  | Reason: APIs updated to the latest NB version

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Davide Carpi  
#18 Posted : 20 January 2016 19:32:54(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
PLUGIN UPDATED SMath Studio 0.97.5737

  • importData.XLSX() can access files opened by other processes (only saved data);

Edited by user 20 January 2016 19:34:50(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
thanks 1 user thanked Davide Carpi for this useful post.
on 20/01/2016(UTC)
Offline Davide Carpi  
#19 Posted : 17 April 2016 13:43:28(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
PLUGIN UPDATED SMath Studio 0.97.5346 and later

- added exportData.XLSX(4)* [extends exportData.XLSX(2)];
- added exportData.XLSX(5)* [extends exportData.XLSX(3)];
- importData.XLSX(...): fixes in path processing;


* How they works:
- If the file doesn't exists, a new file is created;
- If the sheet in the workbook doesn't exists, a new sheet is created;
- If the sheet exists in the workbook, data in the target cells will be overwritten; use these functions with caution if your output may have a different size at each run;

Edited by user 17 April 2016 13:52:26(UTC)  | Reason: typo

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline ElSid  
#20 Posted : 17 April 2016 20:44:14(UTC)
ElSid


Rank: Advanced Member

Groups: Registered
Joined: 05/03/2009(UTC)
Posts: 433
Man
United States
Location: USA

Was thanked: 17 time(s) in 15 post(s)
Does this or any other "excel" plugin work with "ods" extensions? I am on Libre office on both Windows and Linux at home. I could not get to work.
Users browsing this topic
3 Pages123>
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.