xlsread does not read a column

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

xlsread does not read a column

Svetlana
Hello!
I've faced a strange behaviour of xlsread function. I'm trying to read a column from xlsx-file, but xlsread reads only the last number from a column. 2-dimensional arrays are read correctly, though. I have installed packages windows-1.2.3 and io-2.4.2, octave 4.0.3, windows 10. I call xlsread like xlsread('test.xlsx')

Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: xlsread does not read a column

nrjank
On Thu, Aug 4, 2016 at 6:21 AM, Svetlana <[hidden email]> wrote:
Hello!
I've faced a strange behaviour of xlsread function. I'm trying to read a
column from xlsx-file, but xlsread reads only the last number from a column.
2-dimensional arrays are read correctly, though. I have installed packages
windows-1.2.3 and io-2.4.2, octave 4.0.3, windows 10. I call xlsread like
xlsread('test.xlsx')


We may need you to provide some more info, maybe a test xlsx file that produces the behavior you described.  On my PC, I saved a spreadsheet with random numbers filling cells A1:A20.  Then in Octave (4.0.3 on Win7)

>> pkg load io
Picked up JAVA_TOOL_OPTIONS: -Djava.vendor="New Oracle"

>> xlsread('Book1.xlsx')
Detected XLS interfaces: ans =

   0.099512
   0.019583
   0.067221
   0.295066
   0.207370
   0.696878
   0.946749
   0.207276
   0.886299
   0.834514
   0.066391
   0.586122
   0.230843
   0.133635
   0.417620
   0.767146
   0.490875
   0.451724
   0.209516
   0.249191


Can you be more specific? Provide the exact input and output that you're seeing?

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re[2]: xlsread does not read a column

Svetlana
Sure. Here is my xlsx-file (attached). It contains the following column:
1
1
1
1
1
1
2
Here is my call of xlsread: 

clear all
clc

d=xlsread('test.xlsx')

m-file and xlsx-file are in the same directory.

Here is the result: 

Detected XLS interfaces: COM*; (* = default interface)
d = 2
d is double, size(d) is 1x1

Четверг, 4 августа 2016, 18:54 +03:00 от "NJank [via Octave]" <[hidden email]>:

On Thu, Aug 4, 2016 at 6:21 AM, Svetlana <[hidden email]> wrote:
Hello!
I've faced a strange behaviour of xlsread function. I'm trying to read a
column from xlsx-file, but xlsread reads only the last number from a column.
2-dimensional arrays are read correctly, though. I have installed packages
windows-1.2.3 and io-2.4.2, octave 4.0.3, windows 10. I call xlsread like
xlsread('test.xlsx')


We may need you to provide some more info, maybe a test xlsx file that produces the behavior you described.  On my PC, I saved a spreadsheet with random numbers filling cells A1:A20.  Then in Octave (4.0.3 on Win7)

>> pkg load io
Picked up JAVA_TOOL_OPTIONS: -Djava.vendor="New Oracle"

>> xlsread('Book1.xlsx')
Detected XLS interfaces: ans =

   0.099512
   0.019583
   0.067221
   0.295066
   0.207370
   0.696878
   0.946749
   0.207276
   0.886299
   0.834514
   0.066391
   0.586122
   0.230843
   0.133635
   0.417620
   0.767146
   0.490875
   0.451724
   0.209516
   0.249191


Can you be more specific? Provide the exact input and output that you're seeing?

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave



If you reply to this email, your message will be added to the discussion below:
http://octave.1599824.n4.nabble.com/xlsread-does-not-read-a-column-tp4679000p4679018.html
To unsubscribe from xlsread does not read a column, click here.
NAML


=?UTF-8?B?dGVzdC54bHN4?= (9K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Re[2]: xlsread does not read a column

nrjank
On Fri, Aug 5, 2016 at 3:04 AM, Svetlana <[hidden email]> wrote:
 Sure. Here is my xlsx-file (attached). It contains the following column:
1
1
1
1
1
1
2
Here is my call of xlsread: 
clear all
clc
d=xlsread('test.xlsx') m-file and xlsx-file are in the same directory.

Here is the result: 
Detected XLS interfaces: COM*; (* = default interface)
d = 2
d is double, size(d) is 1x1 Четверг,  4 августа 2016, 18:54 +03:00 от "NJank [via Octave]" <[hidden email]>:
>

Hmmm... I'm unable to recreate what you're seeing. I saved you're xslx file and got the following behavior:


>> pkg load io
Picked up JAVA_TOOL_OPTIONS: -Djava.vendor="New Oracle"
>> xlsread('test.xlsx')
Detected XLS interfaces: ans =

   1
   1
   1
   1
   1
   1
   2

>> myvar = xlsread('test.xlsx')
myvar =

   1
   1
   1
   1
   1
   1
   2


If I remember correctly xlsread is a wrapper for other functions that do the actual conversion, and it can call different functions depending what's available on the system. (At least the older versions would look for installed Excel or Openoffice, or use Java, or ...?)  I have MS Office installed which may be affecting the choice made by the program. What do you have?


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Re[2]: xlsread does not read a column

nrjank
On Fri, Aug 5, 2016 at 10:10 AM, Nicholas Jankowski <[hidden email]> wrote:
On Fri, Aug 5, 2016 at 3:04 AM, Svetlana <[hidden email]> wrote:
 Sure. Here is my xlsx-file (attached). It contains the following column:
1
1
1
1
1
1
2
Here is my call of xlsread: 
clear all
clc
d=xlsread('test.xlsx') m-file and xlsx-file are in the same directory.

Here is the result: 
Detected XLS interfaces: COM*; (* = default interface)
d = 2
d is double, size(d) is 1x1 Четверг,  4 августа 2016, 18:54 +03:00 от "NJank [via Octave]" <[hidden email]>:
>

Hmmm... I'm unable to recreate what you're seeing. I saved you're xslx file and got the following behavior:


>> pkg load io
Picked up JAVA_TOOL_OPTIONS: -Djava.vendor="New Oracle"
>> xlsread('test.xlsx')
Detected XLS interfaces: ans =

   1
   1
   1
   1
   1
   1
   2

>> myvar = xlsread('test.xlsx')
myvar =

   1
   1
   1
   1
   1
   1
   2


If I remember correctly xlsread is a wrapper for other functions that do the actual conversion, and it can call different functions depending what's available on the system. (At least the older versions would look for installed Excel or Openoffice, or use Java, or ...?)  I have MS Office installed which may be affecting the choice made by the program. What do you have?



Just curious, what output do you get if you request all of the output arguments?  Please try:

>>  [num_array, text_array, raw_array, limits] = xlsread('test.xlsx')




_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Fwd: Re[4]: xlsread does not read a column

nrjank


---------- Forwarded message ----------
From: "Светлана Стрельникова" <[hidden email]>
Date: Aug 5, 2016 10:57 PM
Subject: Re[4]: xlsread does not read a column
To: "Nicholas Jankowski" <[hidden email]>
Cc:

>
> Yes, here you demonstrate the correct behaviour of xlsread.
> Actually, it worked correctly on my machine too, but a couple of days ago it changed.
> One morning it just started to behave like that (i did not turn off my computer the previous evening),
> may be it was some windows update?
>
> I re-installed octave and windows and io packages from forge, but it didn't help.
> Also I installed octave on a different machine - and got the same result, xlsread does not read columns.
> Both machines have MS Office, 2007 and 2013, respectively. Also I have Java JRE.
>
> I tried [num_array, text_array, raw_array, limits] = xlsread('test.xlsx') and got the following:
>
> Detected XLS interfaces: COM*; (* = default interface)
> num_array = 2
> text_array = {}(0x0)
> raw_array =
> {
> [1,1] = 2
> }
> limits =
>
> scalar structure containing the fields:
>
> numlimits =
>
> 1 1
> 7 7
>
> txtlimits = [](0x0)
> rawlimits =
>
> 1 1
> 7 7
> So, xlsread does see that the actuall length of a column is 7, but somehow it does not put it to the num_array. Sad.
> The only way to read columns that I have found so far is:  d= xlsread('test.xlsx', 'A1:A_very_big_number_for_my_problem_so_i'll_be_sure_that_i have_read_all_from_column) 
>
> Of course, I can previously use numlimits, to find the actuall length of the column, but it seems quite perverted to me.
>
> Thank you for your help.
>
>> Пятница, 5 августа 2016, 17:18 +03:00 от Nicholas Jankowski <[hidden email]>:
>>
>>
>> On Fri, Aug 5, 2016 at 10:10 AM, Nicholas Jankowski <[hidden email]> wrote:
>>>
>>> On Fri, Aug 5, 2016 at 3:04 AM, Svetlana <[hidden email]> wrote:
>>>>
>>>>  Sure. Here is my xlsx-file (attached). It contains the following column:
>>>> 1
>>>> 1
>>>> 1
>>>> 1
>>>> 1
>>>> 1
>>>> 2
>>>> Here is my call of xlsread: 
>>>> clear all
>>>> clc
>>>> d=xlsread('test.xlsx') m-file and xlsx-file are in the same directory.
>>>>
>>>> Here is the result: 
>>>> Detected XLS interfaces: COM*; (* = default interface)
>>>> d = 2
>>>> d is double, size(d) is 1x1 Четверг,  4 августа 2016, 18:54 +03:00 от "NJank [via Octave]" <[hidden email]>:
>>>> >
>>>
>>>
>>> Hmmm... I'm unable to recreate what you're seeing. I saved you're xslx file and got the following behavior:
>>>
>>>
>>> >> pkg load io
>>> Picked up JAVA_TOOL_OPTIONS: -Djava.vendor="New Oracle"
>>> >> xlsread('test.xlsx')
>>> Detected XLS interfaces: ans =
>>>
>>>    1
>>>    1
>>>    1
>>>    1
>>>    1
>>>    1
>>>    2
>>>
>>> >> myvar = xlsread('test.xlsx')
>>> myvar =
>>>
>>>    1
>>>    1
>>>    1
>>>    1
>>>    1
>>>    1
>>>    2
>>>
>>>
>>> If I remember correctly xlsread is a wrapper for other functions that do the actual conversion, and it can call different functions depending what's available on the system. (At least the older versions would look for installed Excel or Openoffice, or use Java, or ...?)  I have MS Office installed which may be affecting the choice made by the program. What do you have?
>>>
>>
>>
>> Just curious, what output do you get if you request all of the output arguments?  Please try:
>>
>> >>  [num_array, text_array, raw_array, limits] = xlsread('test.xlsx')
>>
>>
>>
>

Copying the list. At this point I'm not sure what else to do. You could try stepping through the xlsread mcode and see if anything jumps out.

Might want to file a bug report at bugs.octave.org to get developer eyes on the problem...


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Re[4]: xlsread does not read a column

PhilipNienhuis
NJank wrote
---------- Forwarded message ----------
From: "Светлана Стрельникова" <[hidden email]>
Date: Aug 5, 2016 10:57 PM
Subject: Re[4]: xlsread does not read a column
To: "Nicholas Jankowski" <[hidden email]>
Cc:

>
> Yes, here you demonstrate the correct behaviour of xlsread.
> Actually, it worked correctly on my machine too, but a couple of days ago
it changed.
> One morning it just started to behave like that (i did not turn off my
computer the previous evening),
> may be it was some windows update?
>
> I re-installed octave and windows and io packages from forge, but it
didn't help.
> Also I installed octave on a different machine - and got the same result,
xlsread does not read columns.
> Both machines have MS Office, 2007 and 2013, respectively. Also I have
Java JRE.
>
> I tried [num_array, text_array, raw_array, limits] =
xlsread('test.xlsx') and got the following:
>
> Detected XLS interfaces: COM*; (* = default interface)
> num_array = 2
> text_array = {}(0x0)
> raw_array =
> {
> [1,1] = 2
> }
> limits =
>
> scalar structure containing the fields:
>
> numlimits =
>
> 1 1
> 7 7
>
> txtlimits = [](0x0)
> rawlimits =
>
> 1 1
> 7 7
> So, xlsread does see that the actuall length of a column is 7, but
somehow it does not put it to the num_array. Sad.
> The only way to read columns that I have found so far is:  d=
xlsread('test.xlsx',
'A1:A_very_big_number_for_my_problem_so_i'll_be_sure_that_i
have_read_all_from_column)
>
> Of course, I can previously use numlimits, to find the actuall length of
the column, but it seems quite perverted to me.
>
> Thank you for your help.
>
>> Пятница, 5 августа 2016, 17:18 +03:00 от Nicholas Jankowski <
[hidden email]>:
>>
>>
>> On Fri, Aug 5, 2016 at 10:10 AM, Nicholas Jankowski <[hidden email]>
wrote:
>>>
>>> On Fri, Aug 5, 2016 at 3:04 AM, Svetlana <[hidden email]> wrote:
>>>>
>>>>  Sure. Here is my xlsx-file (attached). It contains the following
column:
>>>> 1
>>>> 1
>>>> 1
>>>> 1
>>>> 1
>>>> 1
>>>> 2
>>>> Here is my call of xlsread:
>>>> clear all
>>>> clc
>>>> d=xlsread('test.xlsx') m-file and xlsx-file are in the same directory.
>>>>
>>>> Here is the result:
>>>> Detected XLS interfaces: COM*; (* = default interface)
>>>> d = 2
>>>> d is double, size(d) is 1x1 Четверг,  4 августа 2016, 18:54 +03:00 от
"NJank [via Octave]" <[hidden email]>:
>>>> >
>>>
>>>
>>> Hmmm... I'm unable to recreate what you're seeing. I saved you're xslx
file and got the following behavior:
>>>
>>>
>>> >> pkg load io
>>> Picked up JAVA_TOOL_OPTIONS: -Djava.vendor="New Oracle"
>>> >> xlsread('test.xlsx')
>>> Detected XLS interfaces: ans =
>>>
>>>    1
>>>    1
>>>    1
>>>    1
>>>    1
>>>    1
>>>    2
>>>
>>> >> myvar = xlsread('test.xlsx')
>>> myvar =
>>>
>>>    1
>>>    1
>>>    1
>>>    1
>>>    1
>>>    1
>>>    2
>>>
>>>
>>> If I remember correctly xlsread is a wrapper for other functions that
do the actual conversion, and it can call different functions depending
what's available on the system. (At least the older versions would look for
installed Excel or Openoffice, or use Java, or ...?)  I have MS Office
installed which may be affecting the choice made by the program. What do
you have?
>>>
>>
>>
>> Just curious, what output do you get if you request all of the output
arguments?  Please try:
>>
>> >>  [num_array, text_array, raw_array, limits] = xlsread('test.xlsx')
>>
>>
>>
>

Copying the list. At this point I'm not sure what else to do. You could try
stepping through the xlsread mcode and see if anything jumps out.

Might want to file a bug report at bugs.octave.org to get developer eyes on
the problem...
The developer did eye it, but while on vacation with patchy web access, replying through nabble (my only option there) moved me to a fairly suspicious Russian email site with loads of "404"-s so I couldn't answer.

Anyway I'll try to look at it this week. I did note something else in Svetlana's reply that shouldn't happen anyway. Maybe I can reproduce her xlsread issues along the way.

Philip
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Re[4]: xlsread does not read a column

PhilipNienhuis
PhilipNienhuis wrote
NJank wrote
---------- Forwarded message ----------
From: "Светлана Стрельникова" <[hidden email]>
Date: Aug 5, 2016 10:57 PM
Subject: Re[4]: xlsread does not read a column
To: "Nicholas Jankowski" <[hidden email]>
Cc:

>
> Yes, here you demonstrate the correct behaviour of xlsread.
> Actually, it worked correctly on my machine too, but a couple of days ago
it changed.
> One morning it just started to behave like that (i did not turn off my
computer the previous evening),
> may be it was some windows update?
>
> I re-installed octave and windows and io packages from forge, but it
didn't help.
> Also I installed octave on a different machine - and got the same result,
xlsread does not read columns.
> Both machines have MS Office, 2007 and 2013, respectively. Also I have
Java JRE.
>
> I tried [num_array, text_array, raw_array, limits] =
xlsread('test.xlsx') and got the following:
>
> Detected XLS interfaces: COM*; (* = default interface)
> num_array = 2
> text_array = {}(0x0)
> raw_array =
> {
> [1,1] = 2
> }
> limits =
>
> scalar structure containing the fields:
>
> numlimits =
>
> 1 1
> 7 7
>
> txtlimits = [](0x0)
> rawlimits =
>
> 1 1
> 7 7
> So, xlsread does see that the actuall length of a column is 7, but
somehow it does not put it to the num_array. Sad.
> The only way to read columns that I have found so far is:  d=
xlsread('test.xlsx',
'A1:A_very_big_number_for_my_problem_so_i'll_be_sure_that_i
have_read_all_from_column)
>
> Of course, I can previously use numlimits, to find the actuall length of
the column, but it seems quite perverted to me.
>
> Thank you for your help.
>
>> Пятница, 5 августа 2016, 17:18 +03:00 от Nicholas Jankowski <
[hidden email]>:
>>
>>
>> On Fri, Aug 5, 2016 at 10:10 AM, Nicholas Jankowski <[hidden email]>
wrote:
>>>
>>> On Fri, Aug 5, 2016 at 3:04 AM, Svetlana <[hidden email]> wrote:
>>>>
>>>>  Sure. Here is my xlsx-file (attached). It contains the following
column:
>>>> 1
>>>> 1
>>>> 1
>>>> 1
>>>> 1
>>>> 1
>>>> 2
>>>> Here is my call of xlsread:
>>>> clear all
>>>> clc
>>>> d=xlsread('test.xlsx') m-file and xlsx-file are in the same directory.
>>>>
>>>> Here is the result:
>>>> Detected XLS interfaces: COM*; (* = default interface)
>>>> d = 2
>>>> d is double, size(d) is 1x1 Четверг,  4 августа 2016, 18:54 +03:00 от
"NJank [via Octave]" <[hidden email]>:
>>>> >
>>>
>>>
>>> Hmmm... I'm unable to recreate what you're seeing. I saved you're xslx
file and got the following behavior:
>>>
>>>
>>> >> pkg load io
>>> Picked up JAVA_TOOL_OPTIONS: -Djava.vendor="New Oracle"
>>> >> xlsread('test.xlsx')
>>> Detected XLS interfaces: ans =
>>>
>>>    1
>>>    1
>>>    1
>>>    1
>>>    1
>>>    1
>>>    2
>>>
>>> >> myvar = xlsread('test.xlsx')
>>> myvar =
>>>
>>>    1
>>>    1
>>>    1
>>>    1
>>>    1
>>>    1
>>>    2
>>>
>>>
>>> If I remember correctly xlsread is a wrapper for other functions that
do the actual conversion, and it can call different functions depending
what's available on the system. (At least the older versions would look for
installed Excel or Openoffice, or use Java, or ...?)  I have MS Office
installed which may be affecting the choice made by the program. What do
you have?
>>>
>>
>>
>> Just curious, what output do you get if you request all of the output
arguments?  Please try:
>>
>> >>  [num_array, text_array, raw_array, limits] = xlsread('test.xlsx')
>>
>>
>>
>

Copying the list. At this point I'm not sure what else to do. You could try
stepping through the xlsread mcode and see if anything jumps out.

Might want to file a bug report at bugs.octave.org to get developer eyes on
the problem...
The developer did eye it, but while on vacation with patchy web access, replying through nabble (my only option there) moved me to a fairly suspicious Russian email site with loads of "404"-s so I couldn't answer.

Anyway I'll try to look at it this week. I did note something else in Svetlana's reply that shouldn't happen anyway. Maybe I can reproduce her xlsread issues along the way.
I had a brief look.
I can reproduce the OP's problem but only with the COM interface. Funny as Excel itself reads the file allright.

Philip

Reply | Threaded
Open this post in threaded view
|

Re[2]: Fwd: Re[4]: xlsread does not read a column

Svetlana
I'm glad to hear about the reproduction of this problem.
I'm quite intrigued what it will be because, after all, it did work correctly on my machine
(with COM interface).


Понедельник, 15 августа 2016, 21:49 +03:00 от "PhilipNienhuis [via Octave]" <[hidden email]>:

PhilipNienhuis wrote
NJank wrote
---------- Forwarded message ----------
From: "Светлана Стрельникова" <[hidden email]>
Date: Aug 5, 2016 10:57 PM
Subject: Re[4]: xlsread does not read a column
To: "Nicholas Jankowski" <[hidden email]>
Cc:

>
> Yes, here you demonstrate the correct behaviour of xlsread.
> Actually, it worked correctly on my machine too, but a couple of days ago
it changed.
> One morning it just started to behave like that (i did not turn off my
computer the previous evening),
> may be it was some windows update?
>
> I re-installed octave and windows and io packages from forge, but it
didn't help.
> Also I installed octave on a different machine - and got the same result,
xlsread does not read columns.
> Both machines have MS Office, 2007 and 2013, respectively. Also I have
Java JRE.
>
> I tried [num_array, text_array, raw_array, limits] =
xlsread('test.xlsx') and got the following:

>
> Detected XLS interfaces: COM*; (* = default interface)
> num_array = 2
> text_array = {}(0x0)
> raw_array =
> {
> [1,1] = 2
> }
> limits =
>
> scalar structure containing the fields:
>
> numlimits =
>
> 1 1
> 7 7
>
> txtlimits = [](0x0)
> rawlimits =
>
> 1 1
> 7 7
> So, xlsread does see that the actuall length of a column is 7, but
somehow it does not put it to the num_array. Sad.
> The only way to read columns that I have found so far is:  d=
xlsread('test.xlsx',
'A1:A_very_big_number_for_my_problem_so_i'll_be_sure_that_i
have_read_all_from_column)
>
> Of course, I can previously use numlimits, to find the actuall length of
the column, but it seems quite perverted to me.
>
> Thank you for your help.
>
>> Пятница, 5 августа 2016, 17:18 +03:00 от Nicholas Jankowski <
[hidden email]>:
>>
>>
>> On Fri, Aug 5, 2016 at 10:10 AM, Nicholas Jankowski <[hidden email]>
wrote:
>>>
>>> On Fri, Aug 5, 2016 at 3:04 AM, Svetlana <[hidden email]> wrote:
>>>>
>>>>  Sure. Here is my xlsx-file (attached). It contains the following
column:

>>>> 1
>>>> 1
>>>> 1
>>>> 1
>>>> 1
>>>> 1
>>>> 2
>>>> Here is my call of xlsread:
>>>> clear all
>>>> clc
>>>> d=xlsread('test.xlsx') m-file and xlsx-file are in the same directory.
>>>>
>>>> Here is the result:
>>>> Detected XLS interfaces: COM*; (* = default interface)
>>>> d = 2
>>>> d is double, size(d) is 1x1 Четверг,  4 августа 2016, 18:54 +03:00 от
"NJank [via Octave]" <[hidden email]>:
>>>> >
>>>
>>>
>>> Hmmm... I'm unable to recreate what you're seeing. I saved you're xslx
file and got the following behavior:

>>>
>>>
>>> >> pkg load io
>>> Picked up JAVA_TOOL_OPTIONS: -Djava.vendor="New Oracle"
>>> >> xlsread('test.xlsx')
>>> Detected XLS interfaces: ans =
>>>
>>>    1
>>>    1
>>>    1
>>>    1
>>>    1
>>>    1
>>>    2
>>>
>>> >> myvar = xlsread('test.xlsx')
>>> myvar =
>>>
>>>    1
>>>    1
>>>    1
>>>    1
>>>    1
>>>    1
>>>    2
>>>
>>>
>>> If I remember correctly xlsread is a wrapper for other functions that
do the actual conversion, and it can call different functions depending
what's available on the system. (At least the older versions would look for
installed Excel or Openoffice, or use Java, or ...?)  I have MS Office
installed which may be affecting the choice made by the program. What do
you have?
>>>
>>
>>
>> Just curious, what output do you get if you request all of the output
arguments?  Please try:
>>
>> >>  [num_array, text_array, raw_array, limits] = xlsread('test.xlsx')
>>
>>
>>
>

Copying the list. At this point I'm not sure what else to do. You could try
stepping through the xlsread mcode and see if anything jumps out.

Might want to file a bug report at bugs.octave.org to get developer eyes on
the problem...
The developer did eye it, but while on vacation with patchy web access, replying through nabble (my only option there) moved me to a fairly suspicious Russian email site with loads of "404"-s so I couldn't answer.

Anyway I'll try to look at it this week. I did note something else in Svetlana's reply that shouldn't happen anyway. Maybe I can reproduce her xlsread issues along the way.
I had a brief look.
I can reproduce the OP's problem but only with the COM interface. Funny as Excel itself reads the file allright.

Philip




If you reply to this email, your message will be added to the discussion below:
http://octave.1599824.n4.nabble.com/xlsread-does-not-read-a-column-tp4679000p4679231.html
To unsubscribe from xlsread does not read a column, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Re[4]: xlsread does not read a column

PhilipNienhuis
In reply to this post by PhilipNienhuis
PhilipNienhuis wrote
PhilipNienhuis wrote
NJank wrote
---------- Forwarded message ----------
From: "Светлана Стрельникова" <[hidden email]>
Date: Aug 5, 2016 10:57 PM
Subject: Re[4]: xlsread does not read a column
:
> Actually, it worked correctly on my machine too, but a couple of days ago
it changed.
> One morning it just started to behave like that (i did not turn off my
computer the previous evening),
> may be it was some windows update?
<snip>
The developer did eye it, but while on vacation with patchy web access, replying through nabble (my only option there) moved me to a fairly suspicious Russian email site with loads of "404"-s so I couldn't answer.

Anyway I'll try to look at it this week. I did note something else in Svetlana's reply that shouldn't happen anyway. Maybe I can reproduce her xlsread issues along the way.
I had a brief look.
I can reproduce the OP's problem but only with the COM interface. Funny as Excel itself reads the file allright.
Svetlana, I think the only thing that changed is that you tried to read a worksheet with just one column of data rather than several columns. That triggered an obscure bug that must have been there for a looong time (many years).

To get rid of the bug:

1.  Type in the Octave terminal:
strrep (which ("oct2xls"), "oct2xls.m", ["private" filesep])
and note the location that is returned;

2.  please copy
http://hg.code.sf.net/p/octave/io/file/7744b4202f87/inst/private/__COM_getusedrange__.m
(if reguired select "raw" in left column)
and put it in the location obtained in step 1.

The (easy) fix is already in the io package repo.

Thanks for reporting.

Philip