Reading Certain Column from Excel
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello Everyone , I am trying to read certain column , from Multisheet Excel, which I am using as input for my Calculation
clc
clear
clearvars
opts = detectImportOptions('Fatigue_life_input.xlsx','Sheet','Input Data','NumHeaderLines',1);
opts.VariableNames = 'Values';
datos = readtable('Fatigue_life_input.xlsx',opts)
Here I am trying to read , Sheet name : Input Data from Filename Fatigue_life_input and I want to read Numeric values which is column 2 . But instead of that it is read column 1.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1158923/image.png)
This is my Input file is excel , I am trying to read only values section
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1158928/image.png)
And this is what i am getting in MATLAB.
0 comentarios
Respuestas (1)
Image Analyst
el 17 de Oct. de 2022
You forgot to attach the workbook. Please do so. What I usually do is
datos = readtable('Fatigue_life_input.xlsx', 'Sheet', 'Input Data', 'Range', 'B2:B19')
0 comentarios
Ver también
Categorías
Más información sobre Spreadsheets en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!