Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

8 Pages123>»
Options
Go to last post Go to first unread
Offline Davide Carpi  
#1 Posted : 12 December 2012 16:20:36(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 885 time(s) in 590 post(s)
Hi all,

Here there is a plugin to share data between SMath and:

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


  • requirements: SMath Studio 0.97.5346 or later, .Net Framework 2.0 (Windows) / Latest Mono distributive (Linux);
  • installation: download the plugin from the gallery;
  • documentation: DataExchange_docs.7z (389kb) downloaded 71 time(s).;
  • sources: SVN repository.
  • languages: if you want to have a new UI language look into the documentation's Language folder.



>>> PLEASE REPORT IN THIS TOPIC ANY ISSUE <<<



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

Edited by user 01 February 2017 12:19:38(UTC)  | Reason: docs updated

File Attachment(s):
DataExchange_docs.7z (397kb) downloaded 338 time(s).
Davide Carpi attached the following image(s):
SMath Studio - [Screenshots.sm].png
Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
thanks 4 users thanked Davide Carpi for this useful post.
on 12/12/2012(UTC),  on 17/01/2013(UTC),  on 25/01/2013(UTC),  on 08/05/2013(UTC)
Offline kilele  
#2 Posted : 13 December 2012 00:29:45(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 390

Was thanked: 131 time(s) in 112 post(s)
Thanks!
I can't open the generated ods file with msexcel, msword or by importing it into gdrive.
FYI the third outputdirexctory is valid for vista as well.
I wonder if you have more plans for these kind of interactions between smath and spreadsheet softwares Wink
Offline Davide Carpi  
#3 Posted : 13 December 2012 02:44:08(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 885 time(s) in 590 post(s)
Originally Posted by: kilele Go to Quoted Post
Thanks!
I can't open the generated ods file with msexcel, msword or by importing it into gdrive.
FYI the third outputdirexctory is valid for vista as well.
I wonder if you have more plans for these kind of interactions between smath and spreadsheet softwares Wink


Hi kilele Good

I've fixed the issue (I think); it depends on the starting template... ODS produced by LibreOffice 3.6.4 can't be opened directly by MS office without recovery (at least for me), now I've found another template (from OpenOffice) and seem that work fine.

I've fixed also some issues with decimal separator [edit] and I've changed the function names (according with the built-in importData function)

An import function would be nice, but seems not an easy task Crazy


regards,

w3b5urf3r


P.S. if you have previously downloaded the "CSV export.dll" plugin don't forget to delete it from the plugin folder.

Edited by user 13 December 2012 04:33:10(UTC)  | Reason: Not specified

Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
Offline kilele  
#4 Posted : 13 December 2012 05:15:40(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 390

Was thanked: 131 time(s) in 112 post(s)
Tested in xp: the .sm sample expects to find a subdirectory called "outputDirectory" Wacko
(this worked right on my other pc with vista)
the .ods is still not opening, actually libreoffice calc says is a corrupt file.

I don't know what you mean by ods template, you may try to convert the csv file to other formats and see the xml format ? for example: convert csv to xlsx, and then xlsx to ods; or convert csv to ods from within gdrive(google) or skydrive(microsoft)

As for the import function, I don't know if you could use a mit licensed component which deals with openxml and allows to create/process excel(calc) sheet without having installed those programs, it is called SpreadsheetLight
Offline kilele  
#5 Posted : 13 December 2012 05:17:21(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 390

Was thanked: 131 time(s) in 112 post(s)
tested on xp:
the .sm sample expects a subdirectory called "outputDirectory" Oh my
this worked right on vista though
the ods is still not opening, actually libreoffice calc says it is a corrupt file.

I don't know what you mean by ods template, you may try to convert the csv to xlsx, and then to ods from within excel and see the structure of the xml file ? or convert the csv to ods from webservices like gdrive(google) or skydrive(microsoft)

As for the import function, I don't know if you could make use of a mit licensed component which deals with openxml to create/process spreadsheets without requiring excel or calc,
it is called spreadsheetlight

Edited by user 13 December 2012 05:33:17(UTC)  | Reason: Not specified

Offline mkraska  
#6 Posted : 13 December 2012 11:18:56(UTC)
mkraska


Rank: Advanced Member

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

Was thanked: 619 time(s) in 408 post(s)
Hi w3b5urf3r,

thanks a lot for your newest contribution to SMath functionality. exportData.CSV works fine for me, ods is unreadable by Excel. I understand, the given pathnames are just examples. You could use any path, including current directory "."

Might be worth to mention that it is not trivial to paste filenames with spaces into function placeholders.
1. paste the clipboard content to the canvas (automatically becomes a text cell if it has spaces)
2. Bracket the text with ""
3. Copy Text including ""
4. Paste into exportData or wherever you need a string with spaces.

Of course, this would be obsolete, if SMath would automatically add string data type markup if the clipboard text is not a valid SMath expression and deliberately is pasted to a math region. Perhaps I should post a feature request.

Best regards, Martin
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://en.smath.info/wi...th%20with%20Plugins.ashx
Offline Davide Carpi  
#7 Posted : 13 December 2012 13:40:23(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 885 time(s) in 590 post(s)
PLUGIN UPDATED

Originally Posted by: kilele Go to Quoted Post
tested on xp:
the .sm sample expects a subdirectory called "outputDirectory" Oh my
this worked right on vista though
the ods is still not opening, actually libreoffice calc says it is a corrupt file.

I don't know what you mean by ods template, you may try to convert the csv to xlsx, and then to ods from within excel and see the structure of the xml file ? or convert the csv to ods from webservices like gdrive(google) or skydrive(microsoft)

As for the import function, I don't know if you could make use of a mit licensed component which deals with openxml to create/process spreadsheets without requiring excel or calc,
it is called spreadsheetlight


I've fixed the issues (all related to unassigned path/filename variables, wrong paths and error handling).

EDIT: plugin updated again with ODS better handling of text variables.

any ODF file it's a zip archive (with a custom extension *.od*) that contain many files (xml,png,...). As first approach I've create an empty ods file from LibreOffice, I've unzipped the ods and I've used the sources as template. Updating the template using a OpenOffice file seem that the output could be opened both from MS excel and Google Docs [Gdocs -> create -> spreadsheet -> file -> open -> upload] Good

The spreadsheetlight plugin it's not compatible (.NET Framework version required is .NET Framework 3.5 instead of 2.0)

Originally Posted by: mkraska Go to Quoted Post
Hi w3b5urf3r,

thanks a lot for your newest contribution to SMath functionality. exportData.CSV works fine for me, ods is unreadable by Excel. I understand, the given pathnames are just examples. You could use any path, including current directory "."

Might be worth to mention that it is not trivial to paste filenames with spaces into function placeholders.
1. paste the clipboard content to the canvas (automatically becomes a text cell if it has spaces)
2. Bracket the text with ""
3. Copy Text including ""
4. Paste into exportData or wherever you need a string with spaces.

Of course, this would be obsolete, if SMath would automatically add string data type markup if the clipboard text is not a valid SMath expression and deliberately is pasted to a math region. Perhaps I should post a feature request.

Best regards, Martin


ODS fixed (I hope)

You're right, you can use any existing path where you have permissions to read and write files (BTW inserting or not a backslash at the end of the filepath doesn't cause issues).

Huh I know, we can't paste nothing (text with/without spaces or numbers) inside a text variable (a variable enclosed by "" ); your workaround is certainly not trivial but solves me many issues Clap


best regards,

w3b5urf3r

Edited by user 13 December 2012 16:11:30(UTC)  | Reason: Not specified

Davide Carpi attached the following image(s):
my SMath ODS output.ods - LibreOffice Calc.png
my smath ods output - Mozilla Firefox.png
Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
Offline kilele  
#8 Posted : 13 December 2012 17:57:13(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 390

Was thanked: 131 time(s) in 112 post(s)
Test on xp:
-the sample does not report errors but now it outputs csv and ods at the same directory as the smath sheet.
-the ods file can't be opened with excel_2007_SP1 but it seems that is required at least 2007_SP2
-the output files does not correspond to the matrix on the sample, see screenshots.

Edited by user 13 December 2012 18:19:24(UTC)  | Reason: Not specified

kilele attached the following image(s):
csv1_gdrive.png
ods1_gdrive.png
csv1_calc.png
csv1_excel.png
Offline kilele  
#9 Posted : 13 December 2012 18:20:39(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 390

Was thanked: 131 time(s) in 112 post(s)
Suggestions:
-support just .xlsx and we're done!
-I don't think .net above 2.0 version is a problem, as far as I know Andrey targeted .Net2.0 to support old versions of windowsMobile and there are not smath versions for that platform since 0.90, however I don't know how this would affect to linux/mono
Offline Davide Carpi  
#10 Posted : 13 December 2012 18:46:43(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 885 time(s) in 590 post(s)
Originally Posted by: kilele Go to Quoted Post
Test on xp:
-the sample does not report errors but now it outputs csv and ods at the same directory as the smath sheet.
-the ods file can't be opened with excel_2007_SP1 but it seems that is required at least 2007_SP2
-the output files does not correspond to the matrix on the sample, see screenshots.

Hi kilele, thank you for your examination Good

The outputDirectory value it's customizable, in the new DataExport.sm the first definition only it's enabled (output sent in the sheet folder).

I consider the 2nd issue a SP1 lack (otherwise the SP2 did not contain any changes about ODF); consider that you can open the ODS with a LibreOffice/OpenOffice for free (even with a portable app) and resave the file as a *.xls or a *.xlsx file.

Consider that a csv file works fine when you share numbers and text; the example contains also nested matrices for testing purposes but I would not recommend to share SMath symbolical data using a CSV file. Besides to load correctly a CSV in MS office you need to import it (On the Data tab, in the Get External Data group, click on "From text" > choose the file to load, set delimiters and others options...); LibreOffice start the import procedure when you open the file, so there are not issues... EDIT obviously I can extend the CSV export features to export symbolical data as a string.

Originally Posted by: kilele Go to Quoted Post
Suggestions:
-support just .xlsx and we're done!
-I don't think .net above 2.0 version is a problem, as far as I know Andrey targeted .Net2.0 to support old versions of windowsMobile and there are not smath versions for that platform since 0.90, however I don't know how this would affect to linux/mono

I prefer the Open Document Standard (Because it's readable from anyone for free, and because I don't have MS office in my home PC XD )

I've already tried to implement a .NET framwork 4.0 plugin in SMath (math.net numerics plugin ) without success... Sad

Edited by user 13 December 2012 18:54:16(UTC)  | Reason: Not specified

Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
Offline kilele  
#11 Posted : 13 December 2012 19:09:40(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 390

Was thanked: 131 time(s) in 112 post(s)
I vote for all of your points Good
Cheers!
Offline Davide Carpi  
#12 Posted : 17 December 2012 20:28:53(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 885 time(s) in 590 post(s)
PLUGIN UPDATED

THE PROJECT NAME IS CHANGED SO PLEASE DELETE ANY OLD PLUGIN ('DataExport.dll' or 'CSV export.dll', if any)


- added new functions importData.ODS(3) and importData.ODS(4) Biggrinirol:

- added new functions exportData.CSV(2) and exportData.ODS(2)


best regards,

w3b5urf3r

Edited by user 17 December 2012 20:31:37(UTC)  | Reason: Not specified

Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
Offline kilele  
#13 Posted : 17 December 2012 22:50:41(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 390

Was thanked: 131 time(s) in 112 post(s)
Incrediblebleble..Che ti amo
You are giving SMath a good bath on steroids Shok

Edit:

I have to withdraw my unconditional regard to your person,
since the export sample worked as in my test on xp the other day, see screenshots above.

Edited by user 17 December 2012 23:41:46(UTC)  | Reason: Not specified

Offline Davide Carpi  
#14 Posted : 18 December 2012 04:24:26(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 885 time(s) in 590 post(s)
Ah, yes...

I've forgot Wallbash to fix a couple of issues in the ODS/CSV exporting with units of measurement (now processed as symbolic data) and nested quotes; the issue revealed itself by opening the exported files with google docs, now seem that work fine...

fixed & updated REMEMBER TO DELETE ANY OLD PLUGIN ('DataExport.dll' or 'CSV export.dll', if any)

As for the MS Office 2007 SP1 import of ODS files, my idea still remain to convert the file with a third party application (LibreOffice/OpenOffice/webservice); alternatively, here there is a free ODF Add-in for Microsoft Office or the official "2007 Microsoft Office Suite Service Pack 3 (SP3)" (or we can hope for a future evolution of the xls plugin...)


best regards,

w3b5urf3r

Edited by user 18 December 2012 05:02:08(UTC)  | Reason: Not specified

Davide Carpi attached the following image(s):
my smath ods output - Mozilla Firefox.png
my smath csv output - Mozilla Firefox.png
Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
thanks 1 user thanked Davide Carpi for this useful post.
on 18/12/2012(UTC)
Offline omorr  
#15 Posted : 18 December 2012 12:29:22(UTC)
omorr


Rank: Administration

Groups: Registered, Administrators, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,573
Man
Serbia

Was thanked: 260 time(s) in 224 post(s)
Hello w3b5urf3r,

All my respect for this plugin as well Good , OK Thank you

Just tried a bit to see the ODS I/O functions (LibreOffice 3.5.7). I used a bit larger numerical data table. This is one of the most desirable feature expected from the import/export data function AFAIC. Just see the picture, please. It seems quite Ok. By the way, as we all know, it is not desirable to represent the entire large matrix in SMath. It will cause troubles by occupying large amount of space.

The first picture is some data made in Calc. The second one is an import to SMath. The third one is made by exporting the matrix. I have no complaints about it. It seems it works just fine, although I was just curious why the scientific format changed while importing and exporting. Actually, I think this is not a big issue.

Regards,
Radovan
File Attachment(s):
data-data1-ods.zip (25kb) downloaded 80 time(s).
dataimport.sm (2kb) downloaded 85 time(s).
omorr attached the following image(s):
data-ods.png
smathioods.png
data1-ods.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Davide Carpi  
#16 Posted : 18 December 2012 16:10:47(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 885 time(s) in 590 post(s)
Originally Posted by: omorr Go to Quoted Post
Hello w3b5urf3r,

All my respect for this plugin as well Good , OK Thank you

Just tried a bit to see the ODS I/O functions (LibreOffice 3.5.7). I used a bit larger numerical data table. This is one of the most desirable feature expected from the import/export data function AFAIC. Just see the picture, please. It seems quite Ok. By the way, as we all know, it is not desirable to represent the entire large matrix in SMath. It will cause troubles by occupying large amount of space.

The first picture is some data made in Calc. The second one is an import to SMath. The third one is made by exporting the matrix. I have no complaints about it. It seems it works just fine, although I was just curious why the scientific format changed while importing and exporting. Actually, I think this is not a big issue.

Regards,
Radovan


Hi omorr,

I did not thought to format the cells for the exponentials... it not require a great effort, I could add this feature tonight Good


best regards,

w3b5urf3r
Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
thanks 1 user thanked Davide Carpi for this useful post.
on 18/12/2012(UTC)
Offline Davide Carpi  
#17 Posted : 19 December 2012 01:20:39(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 885 time(s) in 590 post(s)
Originally Posted by: w3b5urf3r_reloaded Go to Quoted Post
Hi omorr,

I did not thought to format the cells for the exponentials... it not require a great effort, I could add this feature tonight Good


best regards,

w3b5urf3r


As announced, feature added Good

Fixed: issues exporting data containing invisible brackets.

PLUGIN UPDATED


best regards,

w3b5urf3r
Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
thanks 1 user thanked Davide Carpi for this useful post.
on 19/12/2012(UTC)
Offline kilele  
#18 Posted : 19 December 2012 02:45:55(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 390

Was thanked: 131 time(s) in 112 post(s)
w3b5urf3r_reloaded wrote:

..(or we can hope for a future evolution of the xls plugin...)


Thanks for the plugin update.
Just to clarify your comment, I don't get to understand it.
The new format of MS-Excel is xlsx (not xls) and they call it openxml, actually there is a free download for developers called "openxml sdk".
I assume that openoffice and alike may open simple .xlsx (like files with csv) even if only a limited support of excel features are supported.

Edit:

ok I got what you meant, no problem at least for me with Excel2007-SP1 (can't read ods) since I have installed LibreOffice, in general most people working professionally with Excel may have updated to a recent version with ods support, besides that Excel version has nearly 5 years.

Maybe I was thinking of the recent comment by Ioan about the plugin parsing a csv import by means of openxml.

Edited by user 19 December 2012 03:58:12(UTC)  | Reason: Not specified

Offline kilele  
#19 Posted : 19 December 2012 04:53:20(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 390

Was thanked: 131 time(s) in 112 post(s)
you may want to take a look at this mit licensed .net2 component
http://exceldatareader.codeplex.com/
Offline Davide Carpi  
#20 Posted : 19 December 2012 16:48:23(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 885 time(s) in 590 post(s)
Originally Posted by: kilele Go to Quoted Post
Thanks for the plugin update.
Just to clarify your comment, I don't get to understand it.
The new format of MS-Excel is xlsx (not xls) and they call it openxml, actually there is a free download for developers called "openxml sdk".
I assume that openoffice and alike may open simple .xlsx (like files with csv) even if only a limited support of excel features are supported.

Edit:

ok I got what you meant, no problem at least for me with Excel2007-SP1 (can't read ods) since I have installed LibreOffice, in general most people working professionally with Excel may have updated to a recent version with ods support, besides that Excel version has nearly 5 years.

Maybe I was thinking of the recent comment by Ioan about the plugin parsing a csv import by means of openxml.

Hi kilele, Good

For 'xls plugin' I meant the 'excelcollab plugin' made by Andrey or the second one on the Russian side of the forum (?). Good

Because the "openxml sdk" it's based on .NET 3.5 framework, I think that a homemade good plugin it's not easy to make because should be able to read all 4 xls* standards (xls, xlsx ECMA-376, xlsx ISO/IEC 29500 Transitional and the 'new' xlsx ISO/IEC 29500 Strict); so probably (but I'm not sure, because I don't know the differences between the 4 standards) the use of an external plugin as the one you proposed, might be a solution Good

Excel Data Reader seems very good, work under Windows with .Net Framework 2, Windows Mobile with Compact Framework, Linux, OS X, BSD with Mono 2+; unfortunately the plugin can only read files... I think this can be better http://closedxml.codeplex.com/ but works with .NET framework 4.0...

Edited by user 29 December 2012 01:54:56(UTC)  | Reason: Not specified

Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
Users browsing this topic
Similar Topics
[Data Exchange Plugin] Export data (more than 4 columns) (Questions)
by chandragon 29/03/2017 12:08:24(UTC)
8 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.