From: Peter Russo on
So currently im trying to write a file that will read in an xls file (with xlsread), format it a bit in matlab, then export it. Ideally, i'd like to use clipboard('copy', data) to copy the data to the clipboard, but I'd also except exporting it to a txt file.

The problem im having though is that when i read in the xls file, matlab makes it into cells. (the xls file has a mix of text and numbers, so i have to import it as a 'raw' data). Both the clipboard and the dlmwrite commands won't write cells though. Could anyone help with this? A sample of my code is below.

************************************************************
[na,na,input_data] = xlsread(input_file); %read in raw data

output_data=input_data; %This is where the formatting would take place. Simplified for now

%option 1
clipboard('copy',output_data); %copy output to clipboard

%option 2
dlmwrite('output.txt',output_data); %write data to a txt file
From: Walter Roberson on
Peter Russo wrote:
> Both the clipboard and the dlmwrite
> commands won't write cells though.

Getting dlmwrite to write cells is not likely to be a satisfying experience.

I seem to recall it being mentioned that there was an enhanced clipboard
in the Matlab File Exchange (FEX). This is not something I've had a use
for, so I could be misremembering.
 | 
Pages: 1
Prev: parallel execution
Next: load data among spmd