Excel download not working when hosted in Azure

Dear Support,

I have web app with some Syncfusion components. I use xlsio for export datatable. When i debug in local machine the export working as expected. But if the app published to Azure web app the export not working. Only page reloaded. On another page placed Grid. In this page the grid excel export not worked. The symptom is the same. I i pressed excel button on toolbar the page reloaded. In local machine debug worked. What's wrong?

Regards, 
Akos 

9 Replies

MC Mohan Chandran Syncfusion Team November 14, 2017 01:37 PM UTC

Hi Akos, 
  
Thank you for contacting Syncfusion support. 
  
We have tried to reproduce the issue by exporting the data table into Excel, but we are unable to reproduce it. We have shared a video screenshot for your reference which can be downloaded from the following link. 
 
 
We have shared a simple sample which can be downloaded from the following location. 
  
  
Kindly modify the sample to reproduce the issue and share us the modified sample along with the issue reproducing input files which will be helpful for us to give you a prompt solution at the earliest. Also , please confirm us whether you are working with Microsoft Grid view or Syncfusion Grids control . 
  
Regards, 
Mohan Chandran. 



AM Akos Meszaros November 16, 2017 11:55 AM UTC

Dear Mohan,

thank's for your sample project and video. After investigation my project, i find some errors in the web.config, and Site.Master file. Usually in the Script section of head. The export working all right.
Many thank's!

So.. i have another question. Not connected to this thread, but i need your help. I used ej:grid on ASP.NET web form with SQLDatasource and few columns for adding and editing records of database table. I have one column, where i need to edit as masked text (numbers). Required mask 99:99. I read the template column settings but i not find solution for this. It's possible to add masked-edit column for ej:grid?

Regards,
Akos    


MS Mani Sankar Durai Syncfusion Team November 17, 2017 11:45 AM UTC

Hi Akos, 

We have checked your query and found that you are trying to render one of the column as Mask-Edit while editing. Based on your requirement we have already documented by showing the MaskEdit control for one column when editing or adding the grid records and that can be available from the below link 

Please let us know if you need further assistance. 

Regards, 
Manisankar Durai. 



AM Akos Meszaros November 18, 2017 07:54 AM UTC

Hi Manisankar,

if i implement masked textbox to edit template in browser Console this message appear when i add new record to grid:
Uncaught TypeError: args.element.ejMaskEdit is not a function

Here's the page aspx code. The needed masedit field is "Ido":

<%@ Page Title="Adatbevitel" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Adatbevitel.aspx.cs" Inherits="Felmeres.Adatbevitel" %>
<%@ Register TagPrefix="ej" Namespace="Syncfusion.JavaScript.Models" Assembly="Syncfusion.EJ" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>

<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
 <style>
     .jumbotron {
         padding-left: 40px;
          padding-right: 40px;
          text-align:center;
          border-radius: 10px;
     }   
     h2 {
    width: 100%;
    text-align:center;
}
     
    

    </style>
     <div>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                </br>
                <label>Aktuális dátum, idő:  </label>
                <asp:Label ID="idodatum" runat="server"></asp:Label>
                <br />
                 <hr>
                <h2><strong>Adatfelvitel</strong></h2>
                <hr>
                <br />
                
                
                <ej:Grid ID="Grid1" runat='server' CssClass="" DataSourceCachingMode="None" DataSourceID="SqlDS_valaszok" EnableLoadOnDemand="False" MinWidth="0">
                <ToolbarSettings ToolbarItems="add,edit,update,cancel" ShowToolbar="true"></ToolbarSettings>   
                <ClientSideEvents ActionComplete="complete" EndAdd="endAdd" EndDelete="endDelete" EndEdit="endEdit" 
                        RecordDoubleClick="doubleClick" />      
                       <Columns>
                         <ej:Column Field="VID" IsPrimaryKey="true" Visible="false"/>
                         <ej:Column DataType="string" Field="Tevekenyseg" HeaderText="Tevékenység megnevezése" Width="350"/>
                         <ej:Column Field="Jelleg" HeaderText="Jellege"  EditType="Dropdown" TextAlign="Left" Width="110" />
                         <ej:Column DataType="string" Field="Ido" HeaderText="Eltöltött idő (óra.perc)" Width="110">
                         <EditTemplate Create="create" Read="read" Write="write"/>
                         </ej:Column>

                         <ej:Column DataType="string" Field="UID" Visible="false" />
                         <ej:Column DataType="string" Field="IID" Visible="false"/>
                         
                    </Columns>
                <EditSettings AllowEditing="True"  AllowAdding="True" AllowDeleting="False" EditMode="Normal"></EditSettings>
                </ej:Grid>
                <asp:SqlDataSource ID="SqlDS_valaszok" runat="server" ConnectionString="<%$ ConnectionStrings:matrixConnectionString %>"
                    
                         
                    SelectCommand="SELECT * FROM [valaszok] where UID=@uid and IID=@iid" 
                    InsertCommand="Insert into Valaszok (Tevekenyseg,Jelleg,Ido,UID,IID) VALUES (@Tevekenyseg,@Jelleg,@Ido,@UID,@IID)" 
                    UpdateCommand="UPDATE [Valaszok] SET [Tevekenyseg] = @Tevekenyseg, [Jelleg] = @Jelleg, [Ido] = @Ido, [UID] = @UID, [IID] = @IID WHERE [VID] = @VID">     
                    <SelectParameters>
                            <asp:Parameter Name="uid" />
                            <asp:Parameter Name="iid" />
                        </SelectParameters>
                        <InsertParameters>
                            <asp:Parameter Name="Tevekenyseg" Type="String" />
                            <asp:Parameter Name="Jelleg" Type="String" />
                            <asp:Parameter Name="Ido" Type="String" />
                            <asp:Parameter Name="UID" Type="String"/>
                            <asp:Parameter Name="IID" Type="String"/>
                        </InsertParameters>
                        <UpdateParameters>
                            <asp:Parameter Name="Tevekenyseg" Type="String" />
                            <asp:Parameter Name="Jelleg" Type="String" />
                            <asp:Parameter Name="Ido" Type="String" />
                            <asp:Parameter Name="UID" Type="String"/>
                            <asp:Parameter Name="IID" Type="String"/>
                        </UpdateParameters>
                        </asp:SqlDataSource>   

                <br />
                <br />
                <ej:Button ID="Button_elkuld" runat="server" Type="Button" Text="Elküld" OnClick="Button_elkuld_Click" Size="Medium">
              </ej:Button>
               
                 </ContentTemplate>
        
    </asp:UpdatePanel> 
      
      
               
    <script type="application/javascript">
        function endAdd(args) {
            $('#<%= Grid1.ClientID %>').ejWaitingPopup("show");
        }
        function endDelete(args) {
            $('#<%= Grid1.ClientID %>').ejWaitingPopup("show");
       }
       function endEdit(args) {
           $('#<%= Grid1.ClientID %>').ejWaitingPopup("show");
       }
       function complete(args) {
           if (args.requestType == "refresh") {
               $('#<%= Grid1.ClientID %>').ejWaitingPopup("hide");
           }
       }

       
   </script>

         

       </div>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="ScriptSect" runat="server"> 
    <script id="template" type="application/javascript">
        function create() {
            return $("<input>");
        }
        function write(args) {
            args.element.ejMaskEdit({
                maskFormat: "99-99",
                value: args.rowdata["Ido"]
            });
        }
        function read(args) {
            return args.ejMaskEdit("get_StrippedValue");
        }

    </script>
    </asp:Content>

Regards,
Akos



AM Akos Meszaros November 20, 2017 08:09 AM UTC

Dear Support,

problem solved. When i place <ej:maskedit> control to page, the error not appeared and the maskedit works!

Thank's for superb support!

Regards,
Akos


MS Mani Sankar Durai Syncfusion Team November 20, 2017 09:58 AM UTC

Hi Akos, 

Thanks for the update  

We are happy to hear that your problem has been solved.  
Please let us know if you need further assistance. 

Regards, 
Manisankar Durai. 





MT Megha Thimmappa April 5, 2020 12:25 AM UTC

Hi,

Currently i am facing the same issue, grid excel export is not working when published to Azure. Could you please let me know what was the fix?

Thanks,
Megha


AM Akos Meszaros April 5, 2020 07:47 AM UTC

Hi Megha,

Use in the page head:
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
     <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <link rel='nofollow' href="Themes/flat-lime/ej.widgets.all.min.css" rel="stylesheet" />
    <link rel='nofollow' href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.17.0/jquery.validate.js"></script>

Check in the web.config based on your version:
 <appSettings>
    <add key="LoadEJResourcesFromAssembly" value="true" />
</appSettings>
<compilation debug="true" targetFramework="4.5">
      <assemblies>
        <add assembly="Syncfusion.EJ, Version=15.1450.0.33, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
        <add assembly="Syncfusion.EJ.Web, Version=15.1450.0.33, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
      </assemblies>
    </compilation>
<pages validateRequest="false" controlRenderingCompatibilityVersion="4.0">
      <controls>
        <add namespace="Syncfusion.JavaScript.Web" assembly="Syncfusion.EJ.Web, Version=15.1450.0.33, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" tagPrefix="ej" />
        <add namespace="Syncfusion.JavaScript.Web" assembly="Syncfusion.EJ, Version=15.1450.0.33, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" tagPrefix="ej" />
        <add namespace="Syncfusion.JavaScript.Models" assembly="Syncfusion.EJ, Version=15.1450.0.33, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" tagPrefix="ej" />
        <add namespace="Syncfusion.JavaScript.DataVisualization.Models" assembly="Syncfusion.EJ, Version=15.1450.0.33, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" tagPrefix="ej" />
      </controls>
    </pages>


GL Gowri Loganathan Syncfusion Team April 6, 2020 09:00 AM UTC

Hi Megha, 

Thanks for contacting Syncfusion Forum. 

After referring the above suggestion, still facing on issue kindly get back to us with the below details which would be more helpful for us proceed on this query. 

  1. Confirm whether are you receive any exception while export the hosted sample. If yes, please share the stack trace.
  2. Share the complete grid code example (both client and server end).
  3. If possible, share the hosted sample link which reproduces the reported issue.

Regards, 
Gowri V L 
 


Loader.
Up arrow icon