help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with oct2xls range


From: Theodoros Samaras
Subject: Problem with oct2xls range
Date: Wed, 22 May 2019 22:14:37 +0300

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 ?

 

Thanking you in advance

 

Th. S

 

 

 

 

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]