Exporting a Structure into a .xls File
1 view (last 30 days)
Show older comments
I have a problem which asks me to export a structure data into an .xls file. Here's the structure I created:
clc
clear
isimler = char('Aluminum','Copper','Iron','Molybdenum','Cobalt','Vanadium');
semboller = char('Al','Cu','Fe','Mo','Co','V');
atomic_sayi = [13,29,26,42,27,23]';
atomic_agirlik = [26.98,63.55,55.85,95.94,58.93,50.94]';
yogunluk = [2.71,8.94,7.87,10.22,8.9,6.0]';
kristal_yapisi = char('FCC','FCC','BCC','BCC','HCP','BCC');
structure.Metal = isimler;
structure.Sembol = semboller;
structure.AtomicSayi = atomic_sayi;
structure.Yogunluk = yogunluk;
structure.KristalYapisi = kristal_yapisi;
When I use the "xlswrite" function it tells me that array must be a numerical, cell data..... I converted the structure into a cell file with the struct2cell command. However, this time when use the xlswrite function on the excel file, numerical data looks empty. Can you help me with that one?
1 Comment
Hans123
on 9 May 2019
I had a similar problem and I came across multiple good answers.
Hope these helped like it helped me.
Answers (0)
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!