%% Import data from spreadsheet
% Script for importing data from the following spreadsheet:
%
%    Workbook: /Volumes/Data2/TaraEuropa/Partner_data/CNR-P/Metadata_TARA2023.xlsx
%    Worksheet: Foglio1
%
% Auto-generated by MATLAB on 17-Feb-2024 10:43:19

%% Set up the Import Options and import the data
opts = spreadsheetImportOptions("NumVariables", 14);

% Specify sheet and range
opts.Sheet = "Foglio1";
opts.DataRange = "A2:N100";

% Specify column names and types
opts.VariableNames = ["Cruise", "StationNumber", "StationName", "dateDdmmyyyy", "LatitudeN", "LongitudeE", "TimeStartUTC", "TimeEndUTC", "Depthm", "SurfaceSALFromTSGInULab", "SurfaceTEMPCFromTSGInUlab", "FluorescencegLFluoroprobeInULab", "TurbidityMean", "Bathymetrym"];
opts.VariableTypes = ["categorical", "double", "string", "datetime", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double"];

% Specify variable properties
opts = setvaropts(opts, "StationName", "WhitespaceRule", "preserve");
opts = setvaropts(opts, ["Cruise", "StationName"], "EmptyFieldRule", "auto");

% Import the data
A = readtable("/Volumes/Data2/TaraEuropa/Partner_data/CNR-P/Metadata_TARA2023.xlsx", opts, "UseExcel", false);


%% Clear temporary variables
clear opts
save CNR_meta_data A