Borrar filtros
Borrar filtros

Writing few lines to Excel cell

5 visualizaciones (últimos 30 días)
Tamir
Tamir el 1 de Jun. de 2014
Comentada: Image Analyst el 2 de Jun. de 2014
Hello, I am using XLSWRITE in order to write to Excel file and it works well. My problem is that I would like to write to a single cell a few lines. For instance I would like to write :
'0-12,10
50-60,9
70-76,2'
all in one cell. Currently I only to do it in one row : ''0-12,10,50-60,9,70-76,2' Do you have any idea how to force Alt-Enter?
Best, Tamir

Respuesta aceptada

Image Analyst
Image Analyst el 1 de Jun. de 2014
A total SWAG, but try this:
% Create a cell with one multi-line string in it.
oneCell = {sprintf('0-12,10\n,50-60,9\n70-76,2')}
% Write out to Excel
xlswrite(filename, oneCell, 'A1');
  3 comentarios
Tamir
Tamir el 2 de Jun. de 2014
Works great! Thanks a lot!
Image Analyst
Image Analyst el 2 de Jun. de 2014
For others who might read this, which one(s) worked?

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by