Export Crystal Report to Excel Sheet


Do you want to code snippet for Export Crystal Report to Excel Sheet

The Given Coding is directly export the crystal report without showing crystalreportviewer



MemoryStream oStream; // using System.IO
oStream = (MemoryStream)
rpt.ExportToStream(CrystalDecisions.Shared.ExportFormatType.Excel);
Response.Clear();
Response.Buffer = true;
Response.ContentType = "appliaction/ms-excel";

Response.BinaryWrite(oStream.ToArray());
Response.End()



Comments

Author: Vinod06 Oct 2010 Member Level: Gold   Points : 1

hi mohan

plz tell me where to write file name to save the file?

thanks
:)



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: