[Top][All Lists]

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

Re: odswrite: Determining sheet range?

From: Peter P.
Subject: Re: odswrite: Determining sheet range?
Date: Wed, 16 Jul 2014 13:32:37 -0400

* PhilipNienhuis <address@hidden> [2014-07-16 02:17]:
> Peter P. wrote
> > Hi, I am trying to write a cell array back to an .ods file. The ods
> > function requires me to pass a range parameter like "A1:M12" as
> > argument. An empty range is not possible. I wonder how this range can
> > be automatically determined from the array dimensions, which in my
> > case is variable. I would like to build a workaround dealing with all
> > letters in the alphabeth trying to find a translation.
> I'm not sure what you exactly want.
> Which ods function?
Sorry, I had only stated that in the subject of my email. It is
> You can add an empty string (two consecutive quotes or double quotes) to
> odswrite.m / oct2ods.m:
> <file_ptr_struct> = oct2ods (<array>, <file_ptr_struct>, <sheetname>, '')
> or
> odswrite (<filename>, <array>, <sheetname>, '', <intf>)
> implying these functions will take cell A1 as top left array cell and find
> the range to write from the actual array dimensions.
> That is: it should work like that. If not, please file a bug report.
Thank you, I tried this again with an empty string "" and ''
and although the spreadsheet (number 3 in my case, 1 and 2 exist
already ) gets created, it is empty. 
Will file a bug report on that.
> Note that writing .ods files with the OCT interface doesn't seem to work in
> io-2.2.2 (I'm working at that).
Ah, good to know! I am on 2.2.2-1 here, and I am having quite good
results using OCT, besides the "zip" bug I just reported. Thank you
for your valuable work on this! It is greatly appreciated.
> >> odswrite ('test_1.ods', {"a", "b"; 1, 2; 3, 4}, "WS1", "", "otk")
> Creating file test_1.ods
> ans =  1>> odsfinfo ("test_1.ods")
>   1: WS1                              (Used range ~ A1:B3)
> ans = Calc Document
So it seems to be OTK specific. What do I have to install in order to
be able to use the otk interface btw? The octave-java package?
> If you want to do manually sort out ranges, there's a function
> calccelladdress.m in the io package (which in fact is invoked by many
> spreadsheet I/O functions there).
Niiice! Thank you for pointing this one out, which will serve as a
workaround for now!

best, Peter

reply via email to

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