Scilab Home Page | Wiki | Bug Tracker | Forge | Mailing List Archives | Scilab Online Help | File Exchange
ATOMS : xlreadwrite toolbox details
Login with GitLab

xlreadwrite toolbox

read and write xls and xlsx files
(3269 downloads for this version - 15824 downloads for all versions)
Details
Version
1.2
A more recent valid version with binaries for Scilab 6.1 exists: 1.2.4
Author
Stéphane Mottelet
Owner Organization
Université de Technologie de Compiègne
Maintainer
Stéphane MOTTELET
Category
License
Creation Date
September 1, 2020
Source created on
Scilab 6.1.x
Binaries available on
Scilab 6.1.x:
Windows 64-bit Windows 32-bit Linux 64-bit Linux 32-bit macOS
Install command
--> atomsInstall("xlreadwrite")
Description
            This toolbox allows to read and write Excel BIFF8 .xls files and .xslx files in
a transparent way, with the same syntax as the Matlab functions xlsread and
xlswrite. It is based on the Apache POI Java library.
            
Files (2)
[20.70 MB]
OS-independent binary for Scilab 6.1.x
Fixed the startup problem under Windows.
[20.70 MB]
Source code archive

News (0)
Comments (2)     Leave a comment 
Comment from Rudolf Hornischer -- October 5, 2020, 11:05:17 AM    
Hi Stephane,
the current version of the package does not work, see error message below:

Start xlreadwrite
	Load macros
atomsLoad: An error occurred while loading 'xlreadwrite-1.2':
	exec: error on line #64: "javaclasspath: Could not add URL to system classloader : 
C:/Program%20Files/scilab-6.1.0/modules/jvm/jar/org.scilab.modules.jvm.jar."

We have modified xlreadwrite.start as follows to make the package work:

### Original, does not work Win 10 Prof
xlwriteClassPath=['poi_library/poi-4.1.2/'+jars];
classPath=javaclasspath();
javaclasspath([classPath;path+xlwriteClassPath]);

### Modified, work Win 10 Prof
xlwriteClassPath=['poi_library/poi-4.1.2/'+jars];
classPath=javaclasspath();
javaclasspath([path+xlwriteClassPath]);

The demos are not loaded.

Thanks for the package!

Best regards
Rudi
Answer from Stéphane MOTTELET -- October 20, 2020, 09:03:23 AM    
> Hi Stephane,
> the current version of the package does not work, see error message below:
> 
> Start xlreadwrite
> 	Load macros
> atomsLoad: An error occurred while loading 'xlreadwrite-1.2':
> 	exec: error on line #64: "javaclasspath: Could not add URL to system classloader
:
> 
> C:/Program%20Files/scilab-6.1.0/modules/jvm/jar/org.scilab.modules.jvm.jar."
> 
> We have modified xlreadwrite.start as follows to make the package work:
> 
> ### Original, does not work Win 10 Prof
> xlwriteClassPath=['poi_library/poi-4.1.2/'+jars];
> classPath=javaclasspath();
> javaclasspath([classPath;path+xlwriteClassPath]);
> 
> ### Modified, work Win 10 Prof
> xlwriteClassPath=['poi_library/poi-4.1.2/'+jars];
> classPath=javaclasspath();
> javaclasspath([path+xlwriteClassPath]);
> 
> The demos are not loaded.
> 
> Thanks for the package!
> 
> Best regards
> Rudi

Hi,

Thanks for the report. I have fixed this in 1.2.1 binary. Please uninstall the previous
version, refresh the list of packages then reinstall.

S.
Comment from David Chèze -- February 3, 2021, 05:40:09 PM    
Hi Stephane, 
thank you for this nice tool to access directly .xlsx file content. Yet I noticed an 
issue with timeseries data while trying to get "time" formatted cells from .xlsx
as 
below: 

Date	Time	datatest
20/11/2018	00:00:00	0
20/11/2018	01:00:00	0.64
20/11/2018	02:00:00	8.03
20/11/2018	03:00:00	8.6

there's no error message while calling 
--> [value,text,data]=xlread("xldatefail.xlsx");

but I didn't get the expected characters string "00:00:00" neither in data{2,2}
nor 
text(2,2) :
--> data{2,2}
 ans  =

  "31/12/1899"
--> text(2,2)
 ans  =

  "31/12/1899"
 

and value(1,2) is Nan 

while Data formatted cells works fine, text(2,1)  returns "20/11/2018" as
expected 

It would be nice if you see what's going wrong with 'time' format !

thank you 

David





Answer from Stéphane MOTTELET -- February 4, 2021, 04:04:38 PM    
> Hi Stephane, 
> thank you for this nice tool to access directly .xlsx file content. Yet I noticed an 
> issue with timeseries data while trying to get "time" formatted cells from
> .xlsx as 
> below: 
> 
> Date	Time	datatest
> 20/11/2018	00:00:00	0
> 20/11/2018	01:00:00	0.64
> 20/11/2018	02:00:00	8.03
> 20/11/2018	03:00:00	8.6
> 
> there's no error message while calling 
> --> [value,text,data]=xlread("xldatefail.xlsx");
> 
> but I didn't get the expected characters string "00:00:00" neither in
> data{2,2} nor 
> text(2,2) :
> --> data{2,2}
>  ans  =
> 
>   "31/12/1899"
> --> text(2,2)
>  ans  =
> 
>   "31/12/1899"
>  
> 
> and value(1,2) is Nan 
> 
> while Data formatted cells works fine, text(2,1)  returns "20/11/2018" as
> expected 
> 
> It would be nice if you see what's going wrong with 'time' format !
> 
> thank you 
> 
> David
> 
> 
> 
> 
> 

Hi David,

I have improved the date/time handling in new version 1.2.2. Now the value contains the
Excel serial date number (add 693960 to obtain a Scilab serial date number) and the text is
the original formated date string.

S.
Answer from Stéphane MOTTELET -- February 4, 2021, 04:35:22 PM    
Sorry this is now 1.2.3 version (after a small technical problem...).
Leave a comment
You must register and log in before leaving a comment.
Login with GitLab
Email notifications
Send me email when this toolbox has changes, new files or a new release.
You must register and log in before setting up notifications.