C#, EPPLUS - cannot save_as excel another time -


we have excelpackage object given, saved using saveas(file) correctly. when try save_as time (after re-arranging worksheets), thrown exception:

an unhandled exception of type 'system.invalidoperationexception' occurred in epplus.dll error saving file (report.xlsx)

already using latest version 4.0.5 epplus.

also tried other post without luck:

var reportfileinfo = new fileinfo(reportfile);  if (reportfileinfo.exists)    reportfileinfo.delete();  excelreportstream.setlength(0);  excelreport.stream.position = 0; excelreport.stream.copyto(excelreportstream);  using (var exceltosave = new excelpackage()) {    exceltosave.load(excelreportstream);    exceltosave.saveas(reportfileinfo);  <<<<< exception again! } 

an unhandled exception of type 'system.invalidoperationexception' occurred in epplus.dll error saving file (report.xlsx)

the excelpackage property , first try, excelpackage.saveas(reportfile) works on first time. not on second.

no further information compiler... ideas?

thank you.


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -