merging excel files in another excel
1 回表示 (過去 30 日間)
古いコメントを表示
Dear all,
I have some excel files, say sa.xlxs, sd.xlsx, vb.xlsx, ki.xlsx and so forth.
Is there any command for merging all of them in one sheet of another excel file such that the new sheet to contain first the sa.xlxs then sd.xlsx and so forth?
thanks
採用された回答
Oleg Komarov
2012 年 5 月 28 日
You have to use:
- [optional] list = ls() to list the .xlsx files. You can use wildcards.
- Import the files with xlsread()
- Concatenate the data. One of the function you might need to use is cat() or []. Or refer to the many See Also links in cat()
- Write output to excel with xlswrite()
Points 2-4 will usually loop on the list created with point 1 (or user supplied list)
2 件のコメント
Oleg Komarov
2012 年 5 月 28 日
Try points 2 and 4 for a specific file, then add another file (i.e. repeat point 2) then try point 3.
Once you're able to do it for a pair, you can add point 1. and try to write a for loop.
Also give a look here: http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!