Skip to content
Snippets Groups Projects
Commit cd3be8cc authored by Lemmer, Jan's avatar Lemmer, Jan
Browse files

Small changes in CSV export

parent 774ecef2
No related branches found
No related tags found
2 merge requests!43Implements #73, cleans up example file,,!36Resolve "Initialise: Angabe des Ordners ohne Effekt"
Pipeline #592887 passed
......@@ -102,7 +102,7 @@ switch options.Location
storPath = configObj.exportPath;
else
msg = ['Your Export folder ', storPath, newline,...
'does not exist - publishing not possible'];
'does not exist, check the config file - publishing not possible!'];
dlgObj.error(msg);
end
case 'server' %legacy
......@@ -245,17 +245,6 @@ catch
dlgObj.softError('Plot export was not successful');
end
% CSV EXport
if options.CSV
T = table();
T.research_Data = DataPaths'; T.PlotID(:) = {ID};
T.Script_Name(:) = {scriptPath};
T.Storage_Location(:) = {storPath};
T.Date(:) = {datestr(now)};
T = movevars(T,'PlotID','before',1);
writetable(T, fullfile(storPath, 'overview_table.csv'),'WriteMode','append');
end
%% final renaming and error/warning handeling
% if no error orcurred or if force publish is activated, rename the hidden
% folder to a non hidden one, otherwise delete it.
......@@ -269,6 +258,19 @@ if dlgObj.success || options.ForcePublish
status = movefile(oldPath,newPath); %rename directory
end
%% CSV EXport
% ToDo exclude in function
if options.CSV
T = table();
T.research_Data = DataPaths'; T.PlotID(:) = {ID};
T.Author(:) = {configObj.configData.Author};
T.Script_Name(:) = {scriptPath};
T.Storage_Location(:) = {newPath};
T.Date(:) = {datestr(now)};
T = movevars(T,{'PlotID','Author'},'before',1);
writetable(T, fullfile(storPath, 'PlotID_overview.csv'),'WriteMode','append');
end
if status
disp(['publishing of ', ID , ' to ', newPath, ' done']); %always displayed onsucess
else % publish was not sucessfull!
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment