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)

Batch mail report as excel not functioning

(0) ShareShare
ReportReport
Posted on by

Dear All,

I scheduled to run the critical inventory report as batch job and print options set as "E-mail" with PDF format.

This works fine and as per the schedule, and users are getting PDF attachment in the mail.

Later users asks to send the attachment in excel format.

Then when I set the Print format to excel, the mail comes with the excel attachment. But I cannot open the excel sheet.

It gives below error.

"Excel cannot open the file InventSumCritical.Report.xlsx because the file format or file extension is not valid."

Even if I change the extension or, rename the file, the excel cannot be recovered.

Kindly help me to find the fix issue.

Thanks all in advacnce.

Regards,

Chapa.

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    237,948 Most Valuable Professional on at

    What's your version of AX and Excel? Does the file have reasonable size? Can you give us a sample file (without any sensitive data, of course)?

  • Community Member Profile Picture
    on at

    Hi Martin,

    Thanks for the response.

    PROD environment : AX 2012 CU 7.

    DEV environment : AX 2012 CU8

    The weird thing is when I send the same report as excel by mail in from DEV environment, no issue.

    Only when schedule form PROD env it has the issue.

    EXCEL version in both environment is EXCEL 2013.

    The report only contain below type of data.

    Even if I send a blank report, it has the same issue.

    Item number Product name Configuration Size Color Style Site Warehouse Batch number Location Pallet ID Serial number Minimum Physical inventory Ordered
    Item1 Name 1         Site 1 20         2,000.00 1,000.00  
    Item2 Name 2         Site 1 20         2,000.00    
    Item3 Name 3         Site 1 20         3,000.00    
    Item4 Name 4         Site 1 20         3,000.00 2,000.00  

    Regards,

    Chapa.

  • Martin Dráb Profile Picture
    237,948 Most Valuable Professional on at

    I thought you said you have a problem with opening .xlsx files. A picture of HTML representation of the report doesn't seems to have anything to do with your problem. I meant the .xlsx file.

    Please check the size, as I said before. You can also compare files created by DEV and PROD.

    I'm not aware of any CU8 for AX2012. I think you meant either AX2012 R2 or AX2012 R3. Please make it clear.

  • Community Member Profile Picture
    on at

    Dear Martin,

    Sorry I was not able to send the excel as attachment.

    Today I further checked on the issue.

    Mail attachment is generating with .xlsx version. (We have Excel 2013 installed)

    Only I can open the files when save the mail attachment renaming with .xls extension (Excel 97-2003 format).

    I believe some issue with version incompatibility

    Is there any way to fix this.

    Thanks.

  • Martin Dráb Profile Picture
    237,948 Most Valuable Professional on at

    It may depend on your version of SSRS (which you never mentioned).

  • Simone Gili Profile Picture
    55 on at

    Hi All,

    I got the same issue. If SSRS report is shown to screen and after opened through excel it is ok, but if I try to send it as an email attachment when I try to open it excel gives me the message "Excel cannot open the file Example.Report.xlsx because the file format or file extension is not valid.". But if I save the file and rename it in xls instead of xlsx, the file opens correctly. I work with Ax 2012 R2 CU7, SSRS 2012. There's the way to rename the file which I try to attach before sending email?

    Thanks in advance

    Simone

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