Open Excel file read name of data file, process data file write to six different excel output data files, Repeat in a for loop
32 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Branko Celler
am 9 Dez. 2025 um 11:35
Beantwortet: dpb
am 9 Dez. 2025 um 13:19
for i=1:30
open excel INPUT file
read data fle names from Excel INPUT file
% internal loop
for j=1:6
process data
open one excel OUTPUT file
write results to excel file as a cell array along one row of excel output file
save excel file
close excel file
end
end
have tried multiple methods, all of which failed, maybe not appropriate to MATLAB R2020b?
1 Kommentar
Mathieu NOE
am 9 Dez. 2025 um 11:39
hello
we can better help you if you share your code and some excel files along
Akzeptierte Antwort
dpb
am 9 Dez. 2025 um 13:19
for i=1:30
open excel INPUT file
read data fle names from Excel INPUT file
% internal loop
for j=1:6
%process data
C=yourprocessingfunctionthatreturnscellarray();
open one excel OUTPUT file
%write results to excel file as a cell array along one row of excel output file
writecell(C,outputfile(j))
end
end
As in the other Answer, you're trying to do too much here -- writecell and friends handle the opening and the closing internally including creating the new file from the given file name.
As @Mathieu NOE noted, showing an example file always makes easier for folks to make specific code, as well as having actual code to be able to comment on.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Text Files finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!