필터 지우기
필터 지우기

Read excel files and write its data after transpose to another folder

조회 수: 3 (최근 30일)
ahmed obaid
ahmed obaid 2016년 1월 23일
댓글: ahmed obaid 2016년 1월 23일
Dear Matlab Users ,
i have 100 excel files that are saved in specific folder ( "D:\Second_folder"); with names are [ file1.xls , file2.xls , ..... file100.xls] , each file contain only single sheet and includes different data ranges , i need to read each file and then write it in another folder called ("D:\Master_folder" ) by changing its columns to rows and vice versa , so all files are read then transpose and writes to Master folder , ranges of data of each file its differ from other files some files may 100 columns and 20 rows and others may 200 columns and 50 rows , My question is there any matlab code can do that ?
this an example of one excel file
then will be like the following format after written
thanks

답변 (1개)

Geoff Hayes
Geoff Hayes 2016년 1월 23일
Ahmed - are you combining all files into a single file, or are you creating (say) 100 new files in a different folder with all the data transposed? See http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F to get you started on iterating over this sequence of Excel files, xlsread on how to read each file, and transpose on transposing the data.
  댓글 수: 1
ahmed obaid
ahmed obaid 2016년 1월 23일
thanks for your reply , i have files in one source folder with name of ( D:\Second_folder) , these files names are { file1.xls , file2.xls , .... file100.xls} i would like to read data of each file and then write the columns of each file in rows and rows to columns (Transpose) the written new files after processed i need to store in another folder like ("D:\Master_folder" ) and more thing each file contain only single sheet with name of { Sheet1} , thanks

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

카테고리

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