function HS6 = importfile(filename, startRow, endRow)
delimiter = ',';
startRow = 37;
formatSpec = '%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%[^\n\r]';

%% Open the text file.
fileID = fopen(filename,'r');

%% Read columns of data as text:
% For more information, see the TEXTSCAN documentation.
formatSpec = '%q%q%q%q%q%q%q%q%q%q%q%q%q%q%q%q%q%q%q%q%q%q%q%q%q%q%q%q%q%q%q%q%q%q%[^\n\r]';

%% Open the text file.
fileID = fopen(filename,'r');

dataArray = textscan(fileID, formatSpec, 'Delimiter', delimiter, 'MultipleDelimsAsOne', true, 'TextType', 'string', 'HeaderLines' ,startRow-1, 'ReturnOnError', false, 'EndOfLine', '\r\n');

%% Close the text file.
fclose(fileID);
%% Create output variable
HS6 = table(dataArray{1:end-1}, 'VariableNames', {'date','depth','bb405','bb532','bb440','bb700','bb486','bb594','FL1','FL2','bb405uc','bb532uc','bb440uc','bb700uc','bb486uc','bb594uc','FL1uc','FL2uc','beta405','beta532','beta440','beta700','beta486','beta594','betaFL1','betaFL2','beta405uc','beta532uc','beta440uc','beta700uc','beta486uc','beta594uc','betaFL1uc','betaFL2uc'});


