%% Append Cell Array Below Existing Data in Spreadsheet
% Append a cell array to the bottom of a spreadsheet file containing existing data.
% Create two cell arrays in the workspace.

C =  {1,2,3;
     'text',datetime('today'),hours(1)}
rgb = {'red','green','blue'}

% Write the cell array C to a spreadsheet file called C.xls.

writecell(C,'C.xls')

% Append the cell array rgb below the existing data in the spreadsheet file.

writecell(rgb,'C.xls','WriteMode','append')

% Read and display the cell array.

readcell('C.xls')

% Copyright 2019 The MathWorks, Inc.