Problems obtaining the excel file data output
Mostrar comentarios más antiguos
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 comentarios
Guillaume
el 22 de Oct. de 2018
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
el 22 de Oct. de 2018
Guillaume
el 22 de Oct. de 2018
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
el 22 de Oct. de 2018
Aldrin Molero
el 22 de Oct. de 2018
Guillaume
el 22 de Oct. de 2018
Well, obviously it should be Data with a capital D, so:
class(Data)
size(Data)
after you break into the debugger.
Aldrin Molero
el 22 de Oct. de 2018
Editada: Aldrin Molero
el 22 de Oct. de 2018
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Spreadsheets en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!