how do i update a value of a particular column of a cell without changing other columns and store the updated value along with other columns in other cell?
11 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
i read an excel file using xlsread in matlab.the excel file contains 2 columns and 5 rows. the structure of excel file is as follows:
Parameter Value
a 10
b 3
c 5
d 6
e 7
Now,Here i want to change the value of a particular column(lets say i want to change value of parameter a) the value should be present in a particular range say [5 to 15].Now,after changing its value i want to store the updated parameter along with other unchanged parameters in a separate cell and write that updated cell into excel using xlswrite. please note that original excel file which we read into matlab should not be changed or we can say that i have to create a completely different excel sheet and not update the original one.
Please Help,any help would be appreciated.
Thank You in advance
0 个评论
采纳的回答
Image Analyst
2022-1-23
[~, ~, raw] = xlsread(inputFileName); % Read from input file.
raw{someRow, someColumn} = someDifferentValue; % Replace the cell with something different.
xlswrite(outputFileName, raw); % Write the cell out to a new file.
Of course you need to assign the filenames in advance, and also have the new value available.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!