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 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

I have the same question (0)
  • Verified answer
    keoma Profile Picture
    32,729 on at

    use range.insertindent from excel interop.

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

  • Suggested answer
    Suresh Kulla Profile Picture
    50,245 Super User 2025 Season 2 on at

    Try this

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

  • Don Saito Profile Picture
    7 on at

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

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 NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans