Matlab xlswrite覆盖整个excel电子表格
在Matlab中,我需要生成一个单元格的数据,这是我之前运行程序时遗漏的数据,并将其保存到excel文件中。不幸的是,当我试图指定要写入Matlab xlswrite覆盖整个excel电子表格,matlab,export-to-excel,Matlab,Export To Excel,在Matlab中,我需要生成一个单元格的数据,这是我之前运行程序时遗漏的数据,并将其保存到excel文件中。不幸的是,当我试图指定要写入xlswrite的单元格并运行该程序时,它会删除整个excel电子表格,只替换生成的一个单元格。如何在不覆盖整个文件的情况下向现有excel文件添加一个单元格 %// data is gathered and stored in predefined variables dice34, HD34, and MAE34. %// files specified
xlswrite
的单元格并运行该程序时,它会删除整个excel电子表格,只替换生成的一个单元格。如何在不覆盖整个文件的情况下向现有excel文件添加一个单元格
%// data is gathered and stored in predefined variables dice34, HD34, and MAE34.
%// files specified have already been created and have been added data before.
rangeData = 'A7';
D = {dice34};
H = {HD34};
M = {MAE34};
fileNameD = 'DiceCoefficientReformatted34.xlsx';
fileNameH = 'HausdorffDistanceReformatted34.xlsx';
fileNameM = 'MeanAbsoluteErrorReformatted34.xlsx';
sheet = 'Sheet1';
xlswrite(fileNameD, D, sheet, rangeData);
xlswrite(fileNameH, H, sheet, rangeData);
xlswrite(fileNameM, M, sheet, rangeData);
您是否安装了Excel(请参阅)?我安装了-我正在使用它检查是否正确处理您可以使用[~,~,raw]=xlsread(文件名,工作表)读取整个工作表;然后修改一个单元格并重新编写。你能给我一个代码示例吗?我不太清楚如何使用它。