opts = detectImportOptions('tempDataTrollhFlygpl.xlsx')
opts =
SpreadsheetImportOptions with properties:
Sheet Properties:
Sheet: ''
Replacement Properties:
MissingRule: 'fill'
ImportErrorRule: 'fill'
Variable Import Properties: Set types by name using setvartype
VariableNames: {'Tidsperiod_fr_o_m_', 'Tidsperiod_t_o_m_', 'H_jd_meter_verHavet_' ... and 4 more}
VariableTypes: {'datetime', 'datetime', 'datetime' ... and 4 more}
SelectedVariableNames: {'Tidsperiod_fr_o_m_', 'Tidsperiod_t_o_m_', 'H_jd_meter_verHavet_' ... and 4 more}
VariableOptions: [1-by-7 matlab.io.VariableImportOptions]
Access VariableOptions sub-properties using setvaropts/getvaropts
VariableNamingRule: 'modify'
Range Properties:
DataRange: 'A8' (Start Cell)
VariableNamesRange: 'A7'
RowNamesRange: ''
VariableUnitsRange: ''
VariableDescriptionsRange: ''
To display a preview of the table, use preview
%Change the data type of column 4
opts.VariableTypes{4} = 'double';
%Assign the 10th row for variable names
opts.VariableNamesRange = '10:10';
%Assign the cell from which to start reading the data
opts.DataRange = 'A11';
D = readtable('tempDataTrollhFlygpl.xlsx', opts) % anger 10 rubrikrader slik at jeg kan ekstrahere kolonne entries mer effektivt
Warning: Column headers from the file were modified to make them valid MATLAB identifiers before creating variable names for the table. The original column headers are saved in the VariableDescriptions property.
Set 'VariableNamingRule' to 'preserve' to use the original column headers as table variable names.
Set 'VariableNamingRule' to 'preserve' to use the original column headers as table variable names.
D = 6786x7 table
Fr_nDatumTid_UTC_ TillDatumTid_UTC_ RepresentativtDygn Lufttemperatur Kvalitet Var6 Tidsutsnitt_
____________________ _________________ __________________ ______________ ________ __________ _____________________________________________________________________________________________________________________________________________
01-Jan-1961 00:00:01 02-Jan-1961 01-Jan-1961 0.1 {'Y'} {0x0 char} {'Kvalitetskontrollerade historiska data (utom de senaste 3 mån)' }
02-Jan-1961 00:00:01 03-Jan-1961 02-Jan-1961 0.7 {'Y'} {0x0 char} {'Tidsperiod (fr.o.m.) = 1961-01-01 00:00:00 (UTC)' }
03-Jan-1961 00:00:01 04-Jan-1961 03-Jan-1961 1 {'Y'} {0x0 char} {'Tidsperiod (t.o.m.) = 1979-08-01 23:59:59 (UTC)' }
04-Jan-1961 00:00:01 05-Jan-1961 04-Jan-1961 0.4 {'Y'} {0x0 char} {'Medelvärdet är beräknat för = 24 timmar' }
05-Jan-1961 00:00:01 06-Jan-1961 05-Jan-1961 0 {'Y'} {0x0 char} {0x0 char }
06-Jan-1961 00:00:01 07-Jan-1961 06-Jan-1961 0.2 {'Y'} {0x0 char} {'Kvalitetskoderna:' }
07-Jan-1961 00:00:01 08-Jan-1961 07-Jan-1961 0 {'Y'} {0x0 char} {'Grön (G) = Kontrollerade och godkända värden.' }
08-Jan-1961 00:00:01 09-Jan-1961 08-Jan-1961 -1.1 {'Y'} {0x0 char} {'Gul (Y) = Misstänkta eller aggregerade värden. Grovt kontrollerade arkivdata och okontrollerade realtidsdata (senaste 2 tim).' }
09-Jan-1961 00:00:01 10-Jan-1961 09-Jan-1961 -1.1 {'Y'} {0x0 char} {0x0 char }
10-Jan-1961 00:00:01 11-Jan-1961 10-Jan-1961 -0.8 {'Y'} {0x0 char} {'Orsaker till saknade data:' }
11-Jan-1961 00:00:01 12-Jan-1961 11-Jan-1961 -5.4 {'Y'} {0x0 char} {'stationen eller givaren har varit ur funktion.' }
12-Jan-1961 00:00:01 13-Jan-1961 12-Jan-1961 -6.8 {'Y'} {0x0 char} {'kvalitetskontrollerna har felmarkerat data (röd kvalitetskod). Efterföljande manuell granskning godkänner, rättar eller underkänner data.'}
13-Jan-1961 00:00:01 14-Jan-1961 13-Jan-1961 2.6 {'Y'} {0x0 char} {0x0 char }
14-Jan-1961 00:00:01 15-Jan-1961 14-Jan-1961 0.3 {'Y'} {0x0 char} {0x0 char }
15-Jan-1961 00:00:01 16-Jan-1961 15-Jan-1961 2.5 {'Y'} {0x0 char} {0x0 char }
16-Jan-1961 00:00:01 17-Jan-1961 16-Jan-1961 -2.7 {'Y'} {0x0 char} {0x0 char }
plot(D, 3, 4)