i attempting create timestamp (date, or date , time) using either
t=now;
or
t=date;
and when outputs using xlswrite
, date or time , date become spread throughout half dozen cells. i've tried converting arrays , vectors , has same output.
thank you
if give string xlswrite, matlab put each char in 1 cell. entire string 1 excel cell have make cell out of in matlab. 'date' returns string todays date, part easy
xlswrite('test',date); % 1 char in each xlswrite('test2',{date}); % entire date in [1,1]
'now' on other hand number of days (float point hours , on) since 0000-01-01 00:00. writeing little bit tricky since matlab uses 0000-01-01 reference while excel takes 1900-01-01. have not put in cell make string out of before passing excel. if dont either end date in sweet year 3916 or there matlab datenum double number around 730000. of 2 happens dependent on matlab , excel version , on fact else write in .xls. equally unwanted go datestr:
mycell=cell(2,1) mycell(1)={now} mycell(2)={datestr(now)} xlswrite('test3',mycell)
Comments
Post a Comment