CSV file locked after writetable

2 visualizaciones (últimos 30 días)
RP
RP el 4 de Oct. de 2017
Comentada: Walter Roberson el 4 de Oct. de 2017
I'm saving a table d to DL.csv via writetable(d,'DL.csv');
My code creates/writes the csv file correctly but when I try to open the csv I get the message "DL.csv is locked for editing". Has anybody else seen this before and is there a better way to save the table to csv that avoids this issue? Thanks
  1 comentario
Walter Roberson
Walter Roberson el 4 de Oct. de 2017
Which version do you happen to be using? In R2017b the code invoked is toolbox/matlab/datatypes/@tabular/writeTextFile.m and that code uses fopen() and puts in an onCleanup to be sure that the file gets closed, so it shouldn't be left locked after the writetable() returns.

Iniciar sesión para comentar.

Respuestas (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by