read multiple excel files in the one line of the code
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a set of folders which contains excel files. But the name of excel files differ from folder to folder but the content in them is same.Its like GAMMA in one folder and GA and GAM in another folder.All three files don't exist in the same folder. Can i give a command to read them in the same line if it exists in the folder which i want to read...
답변 (2개)
Image Analyst
2012년 7월 24일
No, not unless you put three xlsread()'s on the same line of code. Why does it need to be one line of code? What's wrong with 3 lines?
댓글 수: 3
Image Analyst
2012년 7월 24일
Well you have to write robust code. Sorry about that. You'll need to construct your filename, then call exist(filename, 'file') to check that it actually exists before you call xlsread. Sorry, but robust, bulletproof code can't be written in a single line.
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!