Cell Array to one column with xlswrite

Hello,
I have a 50x1 cell array. Each cell contains a filename:ID1232.csv and ID124.csv. I want the filenames in column A of an excel file. However, when I use xlswrite, each single character is put in a separate column. How can I ensure that the filenames are put entirely in column A?
xlswrite('output.csv', FNM, 1, 'A1')

댓글 수: 3

Jan
Jan 2018년 6월 4일
Please post your data. If the array is a cell string, the output should work directly. Then obviously your array is not a cell string or your xlswrite command contained a strange conversion. We can only find out, what's going on, if you post the data and your code. Prefer to do this by editing the question, not by hiding the information in a comment. Thanks.
Debbie Oomen
Debbie Oomen 2018년 6월 5일
@ Jan have you seen the edited info?
.csv is a comma separated text file. You can open them with Excel also, but "Excel file" means a .xls or .xlsc usually.
Do I guess correctly, that "FNM" is defined like this:
FNM = {'ID1232.csv'; 'ID124.csv'}
? It is better to post the code, which defined the input, than to rephrase it as text. Obviously there is an error anywhere in the code. Then it is not useful to explain, what the code should do instead.

댓글을 달려면 로그인하십시오.

답변 (1개)

Jan
Jan 2018년 6월 5일

0 개 추천

Try this minimal working example:
FNM = {'ID1232.csv'; 'ID124.csv'}
xlswrite('output.xlsx', FNM, 1, 'A1')
Does it work? Then convert your .csv files to .xlsx files.

카테고리

질문:

2018년 6월 4일

답변:

Jan
2018년 6월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by