Problems obtaining the excel file data output

This is my first time using Matlab. I am trying to run a script written by a brilliant team from Columbia University that was designed to examine the gait parameters in freely walking mice (The MouseWalker). When I run the script, this successfully plot the individual gait features of each mouse, however, it fails in creating the excel sheet containing the data (see below). I have tried different versions of Matlab (2013a, 2013b and 2018b), and remove any add in within excel that may potentially preclude the creation of the Excel sheet. I would greatly appreciate any help to fix this issue.
Error using xlswrite (line 192) An error occurred on data export in CSV format.
Error in MouseEvaluate>WriteExcel (line 4146) xlswrite(ExcelFileName, Data, SheetName);
Error in MouseEvaluate (line 1655) WriteExcel(ExcelFileName, InfoData,'1.Info_Sheet');
Error in MouseWalker>evaluate_togglebutton_Callback (line 710) MouseEvaluate(handles);
Error in gui_mainfcn (line 95) feval(varargin{:});
Error in MouseWalker (line 28) gui_mainfcn(gui_State, varargin{:});
Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)MouseWalker('evaluate_togglebutton_Callback',hObject,eventdata,guidata(hObject))

7 件のコメント

Guillaume
Guillaume 2018 年 10 月 22 日
Unfortunately, your error message is not enough to know the cause of the problem. However, since it appears that the code attempts to write a csv file, not an excel file, there is little point in using excel to write the file. Probably the easiest would be to replace the xlswrite call by a call to writetable, after converting data to a table.
What is the type of data?
Aldrin Molero
Aldrin Molero 2018 年 10 月 22 日
The script examine the heat-map impressions left by each mouse paw while walking through a catwalk. These impression are recorded with a high speed camera, and thereafter, the video file rendered to individual frames.
Guillaume
Guillaume 2018 年 10 月 22 日
That's not what I asked. There is a variable data in the call to xlswrite at line 4146. What is its type? The easiest way to find out is to put a breakpoint on line 4146, run the code and when it breaks into the debugger, type:
class(data)
size(data)
and tell us the result.
Aldrin Molero
Aldrin Molero 2018 年 10 月 22 日
I got:
Undefined function or variable 'data'.
Aldrin Molero
Aldrin Molero 2018 年 10 月 22 日
By the way, line 4146 is: xlswrite(ExcelFileName, Data, SheetName);
Guillaume
Guillaume 2018 年 10 月 22 日
Well, obviously it should be Data with a capital D, so:
class(Data)
size(Data)
after you break into the debugger.
Aldrin Molero
Aldrin Molero 2018 年 10 月 22 日
編集済み: Aldrin Molero 2018 年 10 月 22 日
For class(Data): ans = 'cell'
While for size(Data): ans = 34 1

サインインしてコメントする。

 採用された回答

Aldrin Molero
Aldrin Molero 2018 年 10 月 23 日

0 投票

I found the issue. There was nothing wrong with the script, but a problem with excel. The last update of Office left behind the prior version, which prevented matlab to execute the xlswrite command.
In any case, I want to express my thanks to Guillaume for his gracious assistance.

その他の回答 (0 件)

製品

タグ

質問済み:

2018 年 10 月 22 日

回答済み:

2018 年 10 月 23 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by