필터 지우기
필터 지우기

readtable problem: import a large .xls file. (the excel Row vule is more than IV)

조회 수: 1 (최근 30일)
yuan
yuan 2022년 10월 11일
답변: Rahul 2022년 10월 14일
I have some .xls files, need to import, but the excel Row vule is more than IV.
How can I solve the problem? readtable not works.
  댓글 수: 2
Walter Roberson
Walter Roberson 2022년 10월 11일
I do not understand? Excel numbers rows, not names them.
What is the number of rows and columns in the file?
dpb
dpb 2022년 10월 11일
Going to have to do more than that to show it's readtable with a problem....
x=(1:256);
writematrix(x,'text.xlsx')
tX=readtable('test.xlsx');
produced
>> whos x
Name Size Bytes Class Attributes
x 1x256 2048 double
>> tX(:,[1:5 end-5:end])
ans =
1×11 table
Var1 Var2 Var3 Var4 Var5 Var251 Var252 Var253 Var254 Var255 Var256
____ ____ ____ ____ ____ ______ ______ ______ ______ ______ ______
1 2 3 4 5 251 252 253 254 255 256
>>
so that number of columns isn't inherently an issue.
Attach the spreadsheet or at least post the code and error in context...

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

답변 (1개)

Rahul
Rahul 2022년 10월 14일
In general, the amount of data that can be loaded into memory depends on your machine's RAM.
To workaround the memory limitation, MATLAB has a feature called 'datastore'. This feature allows you to read and process your data without loading everything into memory at once.
You can refer to the "tabularTextDatastore" to learn more about 'datastore' for CSV file:
You can also refer to the following documentation for a more general overview about our 'datastore' feature:
Additionally, if your workflow also demands manipulating the data as array after you import them as 'datastore', you can leverage another feature called Tall array:

카테고리

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

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by