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)

Export to excel and cell borders

(0) ShareShare
ReportReport
Posted on by 165

Hi all,

I have to export excel file in customized format. Having borders around my cells.

Can anyone help me to share some blog related excel export with customized format.

Thanks

Zain Khalid Khan

*This post is locked for comments

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

    You have to main options:

    1. You'll use a template with predefined formatting and merely fill it with data at runtime.
    2. You'll set formatting at runtime using an API for manipulating Excel files.
  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi Zain Khan,

    Rather than modifying something in AX wouldn't it be easier doing some kind of automatic formatting in Excel directly for example by making use of Excel-Macros?

    Maybe think about this option before making a system modification.

    Best regards,

    Ludwig

  • Xainu Khan Profile Picture
    165 on at

    I have already customized export to excel. All i need to mofify is to add border around certain cells. I am using SysExcelApplication api.

  • Suggested answer
    Mea_ Profile Picture
    60,284 on at

    Hi Zain,

    Please refer to similar question on community community.dynamics.com/.../134487

  • Xainu Khan Profile Picture
    165 on at

    Is there any blog related detailed api methods of SysExcelApplication.

  • Mea_ Profile Picture
    60,284 on at

    SysExcelApplication does not have a method to work with borders. It is just a wrapper around com object.

    So you have to either create your own x++ methods to wrap com or use com directly as previous discussion does.  

    It has all the code you need, any way here you go another blog post how to create new method for borders :

    axapta2009.wordpress.com/.../applying-formats-to-excel-reports-using-x-in-ax-2009

    But again its just com no nice x++ methods.

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

    Also note that there are managed (.NET) wrappers around these COM objects, which may be easier to use, especially if you're already familiar with .NET.

  • Xainu Khan Profile Picture
    165 on at

    Thanks ievgen you referred looks helpful to me.

    I am trying with these blogs.

  • Mea_ Profile Picture
    60,284 on at

    Don't hesitate to share your solution with us.

  • Xainu Khan Profile Picture
    165 on at

    Will surely share the solution, after work done.

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