Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Indenting Excel cell in NAV 2016

(0) ShareShare
ReportReport
Posted on by 7

Hello, I am trying to export a project plan from NAV into Excel.  Simple enough using the Excel buffer.

However, I would like to indent a cell (not use spaces) as if the user pressed the indent button in Excel. 

The reason for indenting the cell vs. using spaces is so that the spreadsheet can be imported into Smartsheet and will retain the indented structure.  

I don't see any functions in the Excel buffer table that would do this.  So, I expect this would be a dot net interop.  How would I go about doing this, considering I do not have much experience with dot net interop, though I am a seasoned NAV developer. 

*This post is locked for comments

  • Don Saito Profile Picture
    7 on at
    RE: Indenting Excel cell in NAV 2016

    Thanks Jonathan! I did find in codeunit 424 a local variable xlrange that is predefined, so one can call xlrange.insertindent

  • Suggested answer
    Suresh Kulla Profile Picture
    47,688 on at
    RE: Indenting Excel cell in NAV 2016

    Try this

    kauffmann.nl/.../export-to-excel-on-rtc-using-net-interop

  • Verified answer
    keoma Profile Picture
    32,727 on at
    RE: Indenting Excel cell in NAV 2016

    use range.insertindent from excel interop.

    follow msdn.microsoft.com/.../microsoft.office.interop.excel.range.insertindent.aspx

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics NAV (Archived)

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans