help-octave
[Top][All Lists]
Advanced

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

Re: installing java and apache for using spreadsheet I/O


From: rcharan51
Subject: Re: installing java and apache for using spreadsheet I/O
Date: Sun, 13 Jul 2014 22:42:12 -0700 (PDT)

Ok fine.

I am getting an error while writing a cell into excel
saying that

cellfun: all values must be scalars when UniformOutput = true


whats wrong with the cell array that i am trying to write to excel?


On Sat, Jul 12, 2014 at 9:53 PM, Philip Nienhuis [via Octave] <
address@hidden> wrote:

>  Markus Bergholz wrote
> On Sat, Jul 12, 2014 at 5:40 AM, rcharan51 <[hidden email]
> <http://user/SendEmail.jtp?type=node&node=4665447&i=0>> wrote:
>
> > 1.) as you can see from the image mix(75,4) contains the values present
> in
> > D75 cell(02-01-3815) of input.xlsx  but mix(75,4) has
> >
> > >> mix(75,4)
> > ans =
> > {
> >   [1,1] =  699442
> > }
> > I think this is a error related to xlsread.
> >
>
> address@hidden:~/tmp/xl$ grep -r "02-01-3815" *
> address@hidden:~/tmp/xl$
>
>
> There is no "02-01-3815" reference in input.xlsx
>
> And in sheet1.xml cell D75 (75,4) the value is 699442
>
> <c r="D75" s="15">
> <v>699442</v>
> </c>
>
> Afaiu, this is not an error (Matlab read excel dates (date-strings) as
> serial numbers too!).
>
> >> [a,b,c]=xlsread('~/Downloads/input.xlsx');
> >> c(75,4)
>
> ans =
>
>     [699442]
>
> So you have to convert your dates by yourself. Note: Excel starts counting
> dates at 01-Jan-1900 .. or something similar lol
>
> ... and Excel thinks 1900 is a leap year, a corner case to watch out for.
>
> octave:3> datestr (699442)
> ans = 03-Jan-1915
>
> octave:15> datenum ('01-01-1900','dd-mm-yyyy')
> ans =  693962
> octave:16> datestr(699442 + 693962,'dd-mm-yyyy')
> ans = 04-01-3815
> octave:17> datestr(699442 + 693961,'dd-mm-yyyy')
> ans = 03-01-3815
> octave:18> datestr(699442 + 693960,'dd-mm-yyyy')
> ans = 02-01-3815
>
> 693960 is the conversion term, indeed.
>
> Note that also when writing Octave/Matlab datenums to Excel, you'd need to
> convert them beforehand (i.e., subtract 693960), otherwise Excel (and many
> other spreadsheet I/O SW) gets confused, as you can see above.
>
> so xlsread is fine.
>
> Yep.
> Note that Octave's xlsread returns Octave datenums (epoch 0-Jan-0000) for
> date/time cells. It doesn't always work, because the cells in question need
> to be formatted as date / date-time cells. Date values in cells formatted
> as numbers remain numbers and need to be corrected (add 693960) to get
> Octave datenum values.
>
> Philip
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://octave.1599824.n4.nabble.com/Re-installing-java-and-apache-for-using-spreadsheet-I-O-tp4664767p4665447.html
>  To unsubscribe from Re: installing java and apache for using spreadsheet
> I/O, click here
> <http://octave.1599824.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4664767&code=c3JhMTBAaWl0YmJzLmFjLmlufDQ2NjQ3Njd8MTU5MDQyODc2Mw==>
> .
> NAML
> <http://octave.1599824.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 

Yours sincerely,

Raghu Charan A,
Third year undergraduate, School of Infrastructure,
Indian Institute of Technology (IIT) Bhubaneswar, India
Email: address@hidden ,address@hidden
Mobile No: +91 7205733924

-- 

------------------------------
*Disclaimer: *This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity to whom they 
are addressed. If you have received this email in error please notify the 
system manager. This message contains confidential information and is 
intended only for the individual named. If you are not the named addressee 
you should not disseminate, distribute or copy this e-mail. Please notify 
the sender immediately by e-mail if you have received this e-mail by 
mistake and delete this e-mail from your system. If you are not the 
intended recipient you are notified that disclosing, copying, distributing 
or taking any action in reliance on the contents of this information is 
strictly prohibited.




--
View this message in context: 
http://octave.1599824.n4.nabble.com/Re-installing-java-and-apache-for-using-spreadsheet-I-O-tp4664767p4665465.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

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