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. Image for the cookie policy date

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

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?

4 Replies

SR Sellappandi Ramu Syncfusion Team 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



RD Robert David 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");
        }




RD Robert David November 6, 2015 11:47 AM UTC

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


SR Sellappandi Ramu Syncfusion Team 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

Loader.
Live Chat Icon For mobile
Up arrow icon