How can remove Excel column by MATLAB

28 Ansichten (letzte 30 Tage)
Furat Alobaidy
Furat Alobaidy am 5 Dez. 2019
Kommentiert: prasanth vemula am 18 Jun. 2020
Hi ,
please i have Excel file contains multi coulums how can remove entire specfic coulums ;
for example i have colums (A,B , C) how can remove coulum C ?
regards

Akzeptierte Antwort

Bob Thompson
Bob Thompson am 5 Dez. 2019
The simplest way is to load the excel file with xlsread, then write the data back with only the desired columns using xlswrite.
data = xlsread('Myexcelfile.xlsx');
xlswrite('Myexcelfile_reduced.xlsx',data(:,1:2)); % Only columns A and B
  1 Kommentar
prasanth vemula
prasanth vemula am 18 Jun. 2020
Yah, but if the data to be sent back is smaller than the previous data. It`ll only rewrite a part of it and the remaining will be the previous data.
Is there any other work around?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Tags

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by