Exporting Grid Data for Excel, CSV, XML, HTML, PDF [EXAMPLE Codes]

  1. #1

    Exporting Grid Data for Excel, CSV, XML, HTML, PDF [EXAMPLE Codes]

    I have referenced this page; http://examples1.ext.net/#/GridPanel...ort_Data_Ajax/

    and iTextSharp; http://sourceforge.net/projects/itextsharp/

    and this page; http://forums.ext.net/showthread.php...EventMask-Hide

    	<script type="text/javascript">
    		var ExportYap = function () {
    			Ext.net.Mask.show();
    			Ext.net.Mask.hide.defer(500);
    		};
    	</script>
    <TopBar>
    							<ext:Toolbar ID="Toolbar1" runat="server">
    								<Items>
    									<ext:ToolbarFill ID="ToolbarFill1" runat="server" />
    									<ext:Button ID="ButtonXLS" runat="server" Text="XLS" Icon="PageWhiteExcel">
    										<DirectEvents>
    											<Click OnEvent="ExportEt" IsUpload="true" Before="ExportYap()">
    												<ExtraParams>
    													<ext:Parameter Name="data" Value="#{GridPanel1}.getRowsValues()" Mode="Raw" Encode="true" />
    													<ext:Parameter Name="format" Value="xls" Mode="Value" />
    												</ExtraParams>
    											</Click>
    										</DirectEvents>
    									</ext:Button>
    									<ext:Button ID="ButtonDOC" runat="server" Text="DOC" Icon="PageWhiteWord">
    										<DirectEvents>
    											<Click OnEvent="ExportEt" IsUpload="true" Before="ExportYap()">
    												<ExtraParams>
    													<ext:Parameter Name="data" Value="#{GridPanel1}.getRowsValues()" Mode="Raw" Encode="true" />
    													<ext:Parameter Name="format" Value="doc" Mode="Value" />
    												</ExtraParams>
    											</Click>
    										</DirectEvents>
    									</ext:Button>
    									<ext:Button ID="ButtonCSV" runat="server" Text="CSV" Icon="PageAttach">
    										<DirectEvents>
    											<Click OnEvent="ExportEt" IsUpload="true" Before="ExportYap()">
    												<ExtraParams>
    													<ext:Parameter Name="data" Value="#{GridPanel1}.getRowsValues()" Mode="Raw" Encode="true" />
    													<ext:Parameter Name="format" Value="csv" Mode="Value" />
    												</ExtraParams>
    											</Click>
    										</DirectEvents>
    									</ext:Button>
    									<ext:Button ID="ButtonXML" runat="server" Text="XML" Icon="PageWhiteCode">
    										<DirectEvents>
    											<Click OnEvent="ExportEt" IsUpload="true" Before="ExportYap()">
    												<ExtraParams>
    													<ext:Parameter Name="data" Value="#{GridPanel1}.getRowsValues()" Mode="Raw" Encode="true" />
    													<ext:Parameter Name="format" Value="xml" Mode="Value" />
    												</ExtraParams>
    											</Click>
    										</DirectEvents>
    									</ext:Button>
    									<ext:Button ID="ButtonHTML" runat="server" Text="HTML" Icon="PageWhiteH">
    										<DirectEvents>
    											<Click OnEvent="ExportEt" IsUpload="true" Before="ExportYap()">
    												<ExtraParams>
    													<ext:Parameter Name="data" Value="#{GridPanel1}.getRowsValues()" Mode="Raw" Encode="true" />
    													<ext:Parameter Name="format" Value="html" Mode="Value" />
    												</ExtraParams>
    											</Click>
    										</DirectEvents>
    									</ext:Button>
    									<ext:Button ID="ButtonPDF" runat="server" Text="PDF" Icon="PageWhiteAcrobat">
    										<DirectEvents>
    											<Click OnEvent="ExportEt" IsUpload="true" Before="ExportYap()">
    												<ExtraParams>
    													<ext:Parameter Name="data" Value="#{GridPanel1}.getRowsValues()" Mode="Raw" Encode="true" />
    													<ext:Parameter Name="format" Value="pdf" Mode="Value" />
    												</ExtraParams>
    											</Click>
    										</DirectEvents>
    									</ext:Button>
    								</Items>
    							</ext:Toolbar>
    						</TopBar>
    protected void ExportEt(object sender, DirectEventArgs e)
    	{
    		try
    		{
    			#region Convert Data JSON
    			object o = JSON.Deserialize<object>(e.ExtraParams["data"]); 
    			#endregion
    
    			#region JSON for use XML
    			StringBuilder SB = new StringBuilder();
    			SB.Append("{");
    			SB.Append("\"?xml\":");
    			SB.Append("{");
    			SB.Append("\"@version\": \"1.0\",");
    			SB.Append("\"@standalone\": \"no\"");
    			SB.Append("},");
    			SB.Append("\"records\":");
    			SB.Append("{");
    			SB.Append("\"record\":");
    			SB.Append(o.ToString());
    			SB.Append("}}"); 
    			#endregion
    
    			#region Convert JSON to XML
    			XmlDocument XD = (XmlDocument)JsonConvert.DeserializeXmlNode(@SB.ToString());
    			XmlNode XN = XD as XmlNode; 
    			#endregion
    
    			#region Clear Buffer
    			Response.Clear(); 
    			#endregion
    
    			switch (e.ExtraParams["format"].ToString())
    			{
    				#region Document Type XML
    				case "xml":
    					string strXml = XN.OuterXml;
    					Response.AddHeader("Content-Disposition", "attachment; filename=" + SayfaAdi + ".xml");
    					Response.Cache.SetCacheability(HttpCacheability.NoCache);
    					Response.AddHeader("Content-Length", strXml.Length.ToString());
    					Response.ContentType = "application/xml";
    					Response.Write(strXml);
    					break; 
    				#endregion
    
    				#region Document Type XLS
    				case "xls":
    					Response.ContentType = "application/vnd.ms-excel";
    					Response.AddHeader("Content-Disposition", "attachment; filename=" + SayfaAdi + ".xls");
    					Response.Cache.SetCacheability(HttpCacheability.NoCache);
    					XslCompiledTransform XCT1 = new XslCompiledTransform();
    					XCT1.Load(Server.MapPath("xsl/excel.xsl"));
    					XCT1.Transform(XN, null, Response.OutputStream);
    					break; 
    				#endregion
    
    				#region Document Type CSV
    				case "csv":
    					Response.ContentType = "application/octet-stream";
    					Response.AddHeader("Content-Disposition", "attachment; filename=" + SayfaAdi + ".csv");
    					Response.Cache.SetCacheability(HttpCacheability.NoCache);
    					XslCompiledTransform XCT2 = new XslCompiledTransform();
    					XCT2.Load(Server.MapPath("xsl/csv.xsl"));
    					XCT2.Transform(XN, null, Response.OutputStream);
    					break; 
    				#endregion
    
    				#region Document Type PDF
    				case "pdf":
    					using (XmlNodeReader XNR = new XmlNodeReader(XN))
    					{
    						using (DataSet DS = new DataSet())
    						{
    							DS.ReadXml(XNR);
    
    							using (System.Web.UI.WebControls.GridView GridView1 = new System.Web.UI.WebControls.GridView())
    							{
    								GridView1.AllowPaging = false;
    								GridView1.DataSource = DS.Tables[0];
    								GridView1.DataBind();
    
    								Response.ContentType = "application/pdf";
    								Response.AddHeader("content-disposition", "attachment;filename=" + SayfaAdi + ".pdf");
    								Response.Cache.SetCacheability(HttpCacheability.NoCache);
    
    								using (StringWriter SW = new StringWriter())
    								{
    									using (HtmlTextWriter hw = new HtmlTextWriter(SW))
    									{
    										GridView1.RenderControl(hw);
    
    										using (StringReader sr = new StringReader(SW.ToString()))
    										{
    											using (Document D = new Document(PageSize.A4, 10f, 10f, 10f, 0f))
    											{
    												using (HTMLWorker HW = new HTMLWorker(D))
    												{
    													using (PdfWriter.GetInstance(D, Response.OutputStream))
    													{
    														D.Open();
    														HW.Parse(sr);
    														D.Close();
    														Response.Write(D);
    													}
    												};
    											}
    										}
    									}
    								}
    							}
    						}
    					}
    					break; 
    				#endregion
    
    				#region Document Type DOC
    				case "doc":
    					using (XmlNodeReader XNR = new XmlNodeReader(XN))
    					{
    						using (DataSet DS = new DataSet())
    						{
    							DS.ReadXml(XNR);
    
    							using (System.Web.UI.WebControls.GridView GridView1 = new System.Web.UI.WebControls.GridView())
    							{
    								GridView1.AllowPaging = false;
    								GridView1.DataSource = DS.Tables[0];
    								GridView1.DataBind();
    
    								Response.ContentType = "application/vnd.ms-word";
    								Response.AddHeader("content-disposition", "attachment;filename=" + SayfaAdi + ".doc");
    								Response.Cache.SetCacheability(HttpCacheability.NoCache);
    
    								using (StringWriter SW = new StringWriter())
    								{
    									using (HtmlTextWriter HW = new HtmlTextWriter(SW))
    									{
    										GridView1.RenderControl(HW);
    										Response.Output.Write(SW.ToString());
    									}
    								}
    							}
    						}
    					}
    					break; 
    				#endregion
    
    				#region Document Type HTML
    				case "html":
    					using (XmlNodeReader XNR = new XmlNodeReader(XN))
    					{
    						using (DataSet DS = new DataSet())
    						{
    							DS.ReadXml(XNR);
    
    							using (System.Web.UI.WebControls.GridView GridView1 = new System.Web.UI.WebControls.GridView())
    							{
    								GridView1.AllowPaging = false;
    								GridView1.DataSource = DS.Tables[0];
    								GridView1.DataBind();
    
    								Response.ContentType = "text/html";
    								Response.AddHeader("content-disposition", "attachment;filename=" + SayfaAdi + ".html");
    								Response.Cache.SetCacheability(HttpCacheability.NoCache);
    
    								using (StringWriter SW = new StringWriter())
    								{
    									using (HtmlTextWriter HW = new HtmlTextWriter(SW))
    									{
    										GridView1.RenderControl(HW);
    										Response.Output.Write(SW.ToString());
    									}
    								}
    							}
    						}
    					}
    					break; 
    				#endregion
    			}
    
    			#region Close Buffer
    			Response.End(); 
    			#endregion
    		}
    		catch
    		{
    		}
    	}
    I love EXT.Net! I love C#
    Thanks EXT.Net
    Last edited by fatihunal; Jan 17, 2012 at 11:50 PM.
  2. #2
    Thanks for sharing!
    Geoffrey McGill
    Founder & CEO
  3. #3
    Thanks for sharing! Moving to the Examples and Extras forum.
  4. #4
    Thanks for Sharing! Works perfect for me!
  5. #5
    Quote Originally Posted by equiman View Post
    Thanks for Sharing! Works perfect for me!
    Youre wellcome. Enjoy the EXT.Net
  6. #6
    Hellow!!! i'm trying to use this code... but generating buttons dinamically. Maybe can you help me with this:

    http://forums.ext.net/showthread.php...nts-usin-ExtJS

    My problem is that don't now how can I use the DirectEvent when I create the Button.

    Thanks in advance!!
  7. #7

    Issues exporting Excel

    With the code above i am able to export to Word, but neither EXCEL nor CSV

    Excel document generated has has javascript and some binary characters


     DefaultPage
    </title><link id="ctl02" href="../Styles/main.css" rel="stylesheet" type="text/css" />
        <script src="../Scripts/main.js" type="text/javascript"></script>
          <script type="text/javascript">
              var showResult = function (btn) {
                  Ext.Msg.notify("Button Click", "You clicked the " + btn + " button");
              };
    
              var showResultText = function (btn, text) {
                  Ext.Msg.notify("Button Click", "You clicked the " + btn + 'button and entered the text "' + text + '".');
              };
    
              var ExportYap = function () {
                  Ext.net.Mask.show();
                  Ext.net.Mask.hide.defer(500);
              };
    
        </script> 
    
         <style type="text/css">
            .x-window-dlg .ext-mb-download {
                background : transparent url(resources/images/download.gif) no-repeat top left;
                height : 46px;
            }
        </style>  
    </head>
    <body>
          <form name="form1" method="post" action="DefaultPage.aspx?_dc=1475847609417" id="form1" enctype="multipart/form-data">
    <div>
    <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
    <input type="hidden" name="__EVENTARGUMENT" id="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kNTVgUJQnV0dG9uUERGBQ9QYWdpbmdUb29sQmFyMTTnaMaha4NyFltFqxgsI9iahwUszg==" />
    </div>
    
    <script type="text/javascript">
    //<![CDATA[
    var theForm = document.forms['form1'];
    if (!theForm) {
        theForm = document.form1;
    }
    function __doPostBack(eventTarget, eventArgument) {
        if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
            theForm.__EVENTTARGET.value = eventTarget;
            theForm.__EVENTARGUMENT.value = eventArgument;
            theForm.submit();
        }
    }
    //]]>
    </script>
    
    
    <div>
    
    	<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="EE0B99D0" />
    	<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAgKv+7ZvAuTVv5UCwA8qbOQke7z0aZPH+cAfq/i0HZ8=" />
    </div>
          
          <div id="FormatType_Container" style="display:inline;">
    </div>
    Last edited by Gibson; Oct 07, 2016 at 1:54 PM.

Similar Threads

  1. [CLOSED] hide a field while exporting data to Excel
    By Fahd in forum 1.x Premium Help
    Replies: 4
    Last Post: Jun 20, 2012, 4:46 PM
  2. exporting to excel with gridfilters on
    By norphos in forum 1.x Help
    Replies: 0
    Last Post: Oct 18, 2011, 1:14 PM
  3. Replies: 0
    Last Post: Sep 05, 2011, 10:01 AM
  4. Exporting data from the grid
    By emon in forum 1.x Help
    Replies: 0
    Last Post: Mar 05, 2011, 3:40 AM
  5. Replies: 4
    Last Post: Jan 17, 2011, 3:35 PM

Tags for this Thread

Posting Permissions