Style sheet and mailmerge to excel

How to write a code (C/AL Navision) mailmerge to excel. The style sheet tool could only create Mail merge documents and not Excel style sheets at this time. I want a code in navision to create mail merge excel sheet.

Anyone has something about this?