We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid Excel export in firefox not giving file extension and full name

Thread ID:

Created:

Updated:

Platform:

Replies:

121047 Nov 5,2015 04:22 PM UTC Nov 9,2015 11:29 AM UTC ASP.NET MVC 4
loading
Tags: Grid
Robert David
Asked On November 5, 2015 04:22 PM UTC

Hi, we're trying to include the Grids export to Excel utility, We have two problems when exporting in Firefox, when we try to export a grid with the a space in the title the title is trimmed to the first word. Additionally exports produced in Firefox are missing the .xslx extension so they just save as <firstword>.file.  The files downloaded can be opened in excel and opening the .file in excell will produce the correct excell spread sheet.

IE and Google Chrome work fine.

have you encountered this before?

Sellappandi Ramu [Syncfusion]
Replied On November 6, 2015 06:31 AM UTC

Hi Robert,

Thanks for contacting Syncfusion support.

The exporting file extension issue will occur when the file name is not declared with extension as “.xlsx”. We need to specify the extension, otherwise it will export as file format. This issue occurs with all the browsers not only in Firefox browser.

Please refer to the code example for file name extension,

public void ExportToExcel(string GridModel)

        {

            ExcelExport exp = new ExcelExport();

            var DataSource = new NorthwindDataContext().OrdersViews.ToList();

            GridProperties obj = ConvertGridObject(GridModel);

            exp.Export(obj, DataSource, "Export.xlsx", ExcelVersion.Excel2010, false, false, "flat-saffron");
        }


Sample : http://www.syncfusion.com/downloads/support/forum/121047/ze/Sample_121047-1057403082

Check the attached sample with Firebox browser. The same issue is reproduced in this sample and it is a browser issue. Please share the following information to sort out the case of the issue and provide the prompt solution.

1.       Firefox browser version.

2.       Server side code example. 

3.       Screenshot of the exported Grid.

4.       If you are using any workaround in your sample related to export, please share that codes too.

5.       Issue reproducing sample, if it is possible or server hosted link for the sample.
Regards,
Sellappandi R


Robert David
Replied On November 6, 2015 09:58 AM UTC

Hi we have located the issue- If you try to export to a file with spaces in the name everything to the left of the first space gets removed- including the file extension.


Changing the export function to this this will produce a file called "This".

      public void ExportToExcel(string GridModel)
        {
            ExcelExport exp = new ExcelExport();
            var DataSource = new NorthwindDataContext().OrdersViews.ToList();
            GridProperties obj = ConvertGridObject(GridModel);
            exp.Export(obj, DataSource, "This export has spaces.xlsx", ExcelVersion.Excel2010, false, false, "flat-saffron");
        }



Robert David
Replied On November 6, 2015 11:47 AM UTC

Sorry previous message should read "everything to the right of the first space gets removed"

Sellappandi Ramu [Syncfusion]
Replied On November 9, 2015 11:29 AM UTC

Hi Robert,

We have analyzed the reported issues, It’s an firefox browser issue, please refer to the below thread where user reported this issue as bug in Mozilla support.

Thread Link: https://bugzilla.mozilla.org/show_bug.cgi?id=221028

Further analyzing on this issue, we found the extension file to resolve the reported issue. Please download the extension file from following link location and install to Firefox browser.

Extension: http://www.polarcloud.com/truncfix

Regards,
Sellappandi R

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;