Converting .sb(.txt) file to excel file
Show older comments
I have this code below which suppose to convert .sb extension file to excel file. but it is showing error as
Error using fieldnames
Invalid input argument of type 'cell'. Input must be a structure or a Java or COM object.
Error in sb2exl (line 4)
fields = fieldnames(data);
For the convenience of attaching the file, I have converted it to .txt file
data = readsb('6bbb44bb68_archive01.sb');
%preprocess the datato reformat into table format
fields = fieldnames(data);
for i = 1:numel(fields)
field = fields{i};
T.(field) = data.(field)(:);
end
writetable(T, '6bbb44bb68_archive01.xlsx');
Any help is appriciated.
Accepted Answer
More Answers (0)
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!