Extracting specific data from multiple excel files to create a single excel file on MAC

조회 수: 9 (최근 30일)
Hi all I have a folder on my computer with 300 excel files and I don't want to manually extract the middle row from every excel file manually and combine into a single excel file. The rows differ in each file ranging from 4-6, if the row amount is 4 I would like to get the second row.
I was wondering how I can do this on Matlab through reading every Excel file in that specific file and taking out all of the columns from the middle row and then combining all that into a excel file?
I feel like some of the fucntions on a mac are limited compared to a PC.
Thanks in advance for the help!

답변 (1개)

Image Analyst
Image Analyst 2022년 7월 19일
Try the FAQ:
In the middle of the loop, use readmatrix to read in the file and then extract the row(s) you want into a new array. Then after the loop, write out the new array with writematrix
Write back if you can't figure it out and attach a couple of your workbooks with the paperclip icon after reading this:
  댓글 수: 13
Random User
Random User 2022년 10월 10일
Sorry to clarify - what I mean is to take out not to draw back.
In the orginal question we took out the middle row and now instead of the middle row I would like to retrieve the row with the lowest CSA and combining this for all the files in another excel spreadsheet.
When we open data 1. these are the headings
Sample CSA (mm^2) Minor (mm) Major (mm) Circularity
for the third column CSA I would like to find the minimum value and then save it into another excel file. In the same manner that we answered this question.

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

카테고리

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