Xlsx Import/Export plugin

Xlsx Import/Export plugin - share data between SMath Studio and XLSX spreadsheets - Сообщения

#1 Опубликовано: 10.06.2013 03:49:00
Davide Carpi

Davide Carpi

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

Группа: Moderator

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 (38 КиБ) скачан 1399 раз(а).;
  • 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)
XlsxImportExport_docs.7z (37 КиБ) скачан 1118 раз(а).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
9 пользователям понравился этот пост
subseapark 10.01.2018 20:03:00, ioan92 10.06.2013 04:16:00, Вячеслав Мезенцев 10.06.2013 06:40:00, Andrey Ivashov 10.06.2013 15:11:00, IVR 10.06.2013 15:32:00, zoom 17.01.2016 17:15:00, justhumm 06.12.2016 20:37:00, Radovan Omorjan 10.06.2013 03:59:00, Serg 10.06.2013 07:08:00
#2 Опубликовано: 10.06.2013 05:07:53
Davide Carpi

Davide Carpi

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

Группа: Moderator

thank you for the feedback


best regards,

Davide
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#3 Опубликовано: 10.06.2013 06:45:09
genf

genf

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

Группа: User

How to use this plugin - did not quite understand. Thank you.
#4 Опубликовано: 10.06.2013 06:50:31
Davide Carpi

Davide Carpi

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

Группа: Moderator

Wrote

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)

Attached here a pdf to show the expected output.


regards,

w3b5urf3r
Xlsx Import_Export examples.pdf (62 КиБ) скачан 1811 раз(а).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
Serg 10.06.2013 07:08:00
#5 Опубликовано: 10.06.2013 07:03:52
Martin Kraska

Martin Kraska

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

Группа: Moderator

Wrote

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://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 пользователям понравился этот пост
Serg 10.06.2013 07:21:00
#6 Опубликовано: 02.02.2014 23:52:57
Ernesto

Ernesto

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

Группа: User

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.
#7 Опубликовано: 03.02.2014 13:56:49
Davide Carpi

Davide Carpi

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

Группа: Moderator

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
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#8 Опубликовано: 06.04.2014 09:49:33
Ryan Freund

Ryan Freund

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

Группа: User

In the example file it is stated
Цитата

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(""))
#9 Опубликовано: 06.04.2014 10:48:17
Davide Carpi

Davide Carpi

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

Группа: Moderator

Wrote

In the example file it is stated

Цитата

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
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#10 Опубликовано: 18.05.2014 11:45:37
Martin Kraska

Martin Kraska

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

Группа: Moderator

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.
xlsx.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#11 Опубликовано: 18.05.2014 18:12:19
Davide Carpi

Davide Carpi

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

Группа: Moderator

Wrote

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)...
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
Martin Kraska 19.05.2014 14:45:00
#12 Опубликовано: 19.05.2014 14:49:19
Martin Kraska

Martin Kraska

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

Группа: Moderator

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://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#13 Опубликовано: 19.05.2014 18:07:46
Davide Carpi

Davide Carpi

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

Группа: Moderator

Nice idea...

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


Best regards,

Davide
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#14 Опубликовано: 05.08.2014 11:56:26
msiseminger

msiseminger

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

Группа: User

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
1 пользователям понравился этот пост
Davide Carpi 05.08.2014 14:05:00
#15 Опубликовано: 07.03.2015 10:05:02
Davide Carpi

Davide Carpi

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

Группа: Moderator

PLUGIN UPDATED

- ImportData.XLSX now get results where cells references other cells;
- fixed export on SMath Viewer;
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#16 Опубликовано: 11.03.2015 15:26:49
Alexander O. Melnik

Alexander O. Melnik

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

Группа: Moderator

I figured this conversation is best to be continued here

Wrote

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
SpreadSheet IOxlsx.7z (11 КиБ) скачан 131 раз(а).
#17 Опубликовано: 25.06.2015 15:39:07
Davide Carpi

Davide Carpi

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

Группа: Moderator

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");
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#18 Опубликовано: 20.01.2016 13:32:54
Davide Carpi

Davide Carpi

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

Группа: Moderator

PLUGIN UPDATED SMath Studio 0.97.5737

  • importData.XLSX() can access files opened by other processes (only saved data);
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
ioan92 20.01.2016 14:08:00
#19 Опубликовано: 17.04.2016 07:43:28
Davide Carpi

Davide Carpi

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

Группа: Moderator

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;
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#20 Опубликовано: 17.04.2016 14:44:14
Ruben Sidranski

Ruben Sidranski

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

Группа: User

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.
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений