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
Post a Comment