[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with oct2xls range
From: |
PhilipNienhuis |
Subject: |
Re: Problem with oct2xls range |
Date: |
Wed, 5 Jun 2019 12:27:55 -0500 (CDT) |
Theodoros Samaras wrote
> Greetings,
>
> Starting just recently to use octave, I encountered the following
> situation
> while trying to export data to an .xlsx spreadsheet.
>
>
> pkg load io;
>
> file = 'test.xlsx';
>
> A = zeros(4,4)
>
> for i=1:rows(A)
>
> for j=1:columns(A)
>
> A(i,j)=int32(100*rand());
>
> endfor
>
> endfor
>
> rownum=1;
>
> ##The following command exports all the matrix elements in cells A1:D4
>
> status=xlswrite(sprintf('%c',file'),A,'Sheet1',sprintf('A%d',rownum'));
>
>
> 17 50 43 85
>
> 88 7 9 40
>
> 73 3 41 79
>
> 63 90 74 0
>
>
> ##While the following will write ONLY the first matrix element in cell A1
>
> XLS = xlsopen(file);
>
> [XLS,status] = oct2xls(A,XLS,'Sheet1',sprintf('A%d',rownum'));
>
> XLS=xlsclose(XLS);
>
>
>
> 17
>
>
>
> Is there any difference in range definition between the two functions ?
>
> Am I doing something wrong ?
>
> Tested in more than machines with different OS (Win 7, Win 10) running GNU
> Octave 5.1.0 and io-2-4-12.
>
> Any ideas ?
Can you file a bug report, please?
The issue is that specifying an address of just one single cell rather than
a range (i.e., rather than using ":" between cell addresses) shouldn't
truncate the output array.
Thanks,
Philip
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
- Re: Problem with oct2xls range,
PhilipNienhuis <=