필터 지우기
필터 지우기

Error exporting data to Excel

조회 수: 2 (최근 30일)
Sunkensie
Sunkensie 2015년 7월 2일
댓글: Sunkensie 2015년 7월 2일
I'm currently receiving this error when trying to export data using xlswrite:
"Error using xlswrite (line 219)
No appropriate method, property, or field workbooks
for class COM.Excel_Application."
I've tried various workarounds, such as disabling Excel add-ins ( as suggested here ), however nothing seems to helped me to get this hump. Restarting the program doesn't help, and the column of data is too long to Copy.
The code I'm currently using is thus:
">> filename = 'trend.xls'
>> load('theil_spring.mat')
>>A=theil(:,1)
>>xlswrite(filename,A)"
I would greatly appreciate any help with this matter. Apologies if this is a basic issue - I'm new to MatLab and I'm still having some teething pains.
  댓글 수: 1
Sunkensie
Sunkensie 2015년 7월 2일
I created a work-around to solve this. It turns out the amount of data was causing memories in MatLab. To solve this I used the following code to re-organise my data:
j=1;n=length(theil);k=2;
for i=1:(n/k)
X(:,i)=theil(j:j+(k-1),1);
j=j+2;
end
It was then a simple matter of copy & pasting it into Excel. Crude, but it worked.

댓글을 달려면 로그인하십시오.

답변 (1개)

mun1013
mun1013 2015년 7월 2일
It should be filename = 'trend.xls'
  댓글 수: 3
mun1013
mun1013 2015년 7월 2일
is there something you missed out in this function? xlswrite(filename, A , 'Sheet1' ,'A1:Z1');
Sunkensie
Sunkensie 2015년 7월 2일
I've checked the associated documentation, and I don't need to specify a page or range. It's a single data column of 1865346 cells, specified as a cell array, which I want to export. I did specify the range in the function ('A1:A1865346')in case it helped. Either way the error persists.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by