Skip to main content

Posts

Showing posts with the label class code example

Code sample to open existing excel file in Axapta

Code sample to open excel file in Axapta. You can use below code in any version of Axapta. First, you need to paste the file in particular folder path then you can open it by using job or class. You can check below code through job x++ editor. This code can be helpful if you want to provide the menu item to export template for the user. fileName = "C:\\Users\\Public\\Documents\\TestTemplate.xlsx" ; WinAPI::shellExecute(fileName); WinAPI::setFileAttributes(filename,1);