Home > X++ stuffs > Tip: Suppress “Save Changes” prompt when you close a Excel workbook using X++ in Dynamics AX

Tip: Suppress “Save Changes” prompt when you close a Excel workbook using X++ in Dynamics AX


In Microsoft Dynamics AX, to read data from excel worksheets the focus needs to shift on the active workbook. So when application is closed you’ll still find the process thread being shown up in Task manager and when trying to view the excel file a dialog prompt appears

Prompt when you close workbook in Excel



To suppress the following, try forcing a workbook to close without saving changes. The best way of implementing this via x++ code [ sysExcelWorkbook.saved(true) ]

REASON:If Saved property is set to True, Excel responds as though the workbook has already been saved and no changes have occurred since that last save.

To know more on the way its handled in C#, refer MS link Workbook.Saved Property

Advertisements
Categories: X++ stuffs
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: