Is there a way in matlab where I can delete the first row of 50 excel files in a folder?

4 ビュー (過去 30 日間)
Hi,
I would like to delete the first row from 50 different excel files all saved in a same folder. Is there a way to do it in matlab? All I could have come across so far is how to delete the rows from a single file.
Any help would be appreciated!

採用された回答

Cris LaPierre
Cris LaPierre 2020 年 10 月 28 日
You would take the code for a single file, and put it inside a for loop that iterates through every file in the folder. You can either hardcode the path to the folder or use uigetdir. Once you have the folder, use the dir function to get the file names. Then set your loop to run from 1:length(filenames).
  2 件のコメント
muhammad choudhry
muhammad choudhry 2020 年 10 月 28 日
Can you give me an example or can guide me what I need to do more in the code below I am working on, it reads the file but I am not sure what else to do to delete the first row from each file and save it.
Creating a code: # this code only reading the number of files available
csvFiles = dir("*.csv") ;
N = length(csvFiles) ;
for i = 1:N
.................
end
Cris LaPierre
Cris LaPierre 2020 年 10 月 28 日
Perhaps this post can get you started.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by