web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

AX Save As Type for Excel File Export

(0) ShareShare
ReportReport
Posted on by

Is there a way to "force" the excel extension to default xlsx (but not xls) by changing the AX class(es)?

For example: SysExcelHelper > getFileExtensions

Your help is greatly appreciated!

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,109 Super User 2025 Season 2 on at

    Hi,

    Can you explain exactly where and why you would need this?

  • Community Member Profile Picture
    on at

    I think this might help you .. " technet.microsoft.com/.../gg731844.aspx "The old format of excel was xls and the new format would be xlsx. Might be installing a new add-on to your system might work.

    Thanks and Regards

    Sandeep

  • Community Member Profile Picture
    on at

    When I run AX on the server, the default Save as Excel extension on the print destination is "xlsx" and the file export is successfully done. For some reason the extension shows as "xls" if run it on the client and the export is failing. I can manually put the "x" back to the extension with the filename before I run the job as a workaround. However, we have to deploy AX to all our client's machine meaning it will become a big training issue.

    I believe that the AX is reading MS version on the client to decide file extension showing on the save as dialog box. I have MS Excel 2010 installed on the local machine for sure. I also blocked the Excel 97-2003 workbooks from the Trust Center Settings on Excel, but still not solving the issue.

    There are 2 classes in AX that I think it might be the place causing the problem, if the excel version is not reading correctly.

    SysExcelApplication construct()

    excelVersion = str2num(excel.version());

        if (excelVersion >= 12.0)
            ret = SysExcelApplication_2007::construct(excel);
        else if (excelVersion >= 10.0)
            ret = SysExcelApplication_XP::construct(excel);
        else
            ret = SysExcelApplication_2000::construct(excel);
        return ret;


    /// <summary>
    ///    Gets the default file name extension used for this version of Microsoft Office Excel.
    /// </summary>
    /// <returns>
    ///    The default file name extension used for this version of Microsoft Office Excel.
    /// </returns>
    /// <remarks>
    ///    The default extension for Microsoft Office Excel 2007 is XLSX. The default extension for earlier
    ///    versions is XLS.
    /// </remarks>
    public str getFileExtension()
    {
        if (sysExcelApplication.version() == MSOfficeVersion::Office2007)
        {
            return strReplace(#XLSX, '*', '');
        }
        else
        {
            return strReplace(#XLS, '*', '');
        }
    }

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    In most of the cases AX does use the local user accounts' settings ie. for default printers. I would imagine that the AX client accounts' Excel settings are driving the default format, so you should check the Excel settings and registry keys.

    I only have access to the latest 2016 version and can confirm that you could pick a default file format within the Excel options, probably there is something similar for you too:

    xlsx.jpg

  • Community Member Profile Picture
    on at

    I have the same setup on my local Excel Options but I still get "Microsoft Excel 97-2003 Worksheet (*.xls)" on the AX Save As diolog box.

  • Community Member Profile Picture
    on at

    We had couple of excel add-in issues on server connection information, so we decided to take this off from the project scope for now.

  • Community Member Profile Picture
    on at

    Do you know which CLSID (local registry - HKEY_CLASSES_ROOT) is using/reading by AX for excel file export?

  • André Arnaud de Calavon Profile Picture
    301,109 Super User 2025 Season 2 on at

    Hi RH-AXC,

    When I read the coding above, this is now only evaluating Office 2007 to have XLSX.

    Try to change a part: (check if you need to add excelVersion as variable in this method or not.)

    public str getFileExtension()

    {

       excelVersion = str2num(excel.version());

       if (excelVersion >= 12.0)  //Office 2007 or above

       {

           return strReplace(#XLSX, '*', '');

       }

       else

       {

           return strReplace(#XLS, '*', '');

       }

    }

  • Suggested answer
    IvanovAntonGr Profile Picture
    5 on at

    SSRS 2012/2014 will render the report in XLSX format (Excel 2007 and above) regardless of the Excel version installed on the client (you may not have Excel installed at all).

    What you encounter is probably an XLS file extension that AX mistakenly adds to the file name (with a subsequent error while saving the report).

    The solution is simple - make sure the user (or AD group) has Browser permission (at least) for the top Home folder in SSRS (not the DynamicsAX folder, but the Home folder).

    _21043A04400438043D0448043E044204_-2020_2D00_01_2D00_14-14.31-Greenshot.jpg

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans