c# - Zipping multiple excel files -


i need multiple excel files (ssrs reports), put them in folder , zip it. how tried, it's not working:

public actionresult pricingreports( list<int> productids ) {     memorystream memstream = new memorystream();     using ( ziparchive archive = new ziparchive( memstream, ziparchivemode.update ) )     {         foreach ( int id in productids )         {             //preparing single excel file             reportmodel model = preparereportmodel( values );              _ssrs.getreport( model, "excel" );              ziparchiveentry singlereport = archive.createentry( "pricingreport" + " - " + id );             using ( binarywriter binwriter = new binarywriter( singlereport.open() ) )             {                 binwriter.write( model.reportbits );             }         }     }     return file( memstream.toarray(), system.net.mime.mediatypenames.application.octet, "pricing reports" ); } 


Comments

Popular posts from this blog

Capture and play voice with Asterisk ARI -

c++ - Can not find the "fiostream.h" file -

java - Why database contraints in HSQLDB are only checked during a commit when using transactions in Hibernate? -