Adding a new worksheet tab for excel export. Previous versions used Worksheets.Add With Excel 2016 in NAV2017 this fails
*This post is locked for comments
the question was how to add a new tab to tab to an existing worksheet
that worked in 2009 R2 with excel2013 but does not work in NAV2017 with excel2016
Hi Marysimmons,
Excel Buffer table (ID 370) is a good place to study how system works with Excel.
Take a look at WriteSheet function in the table, you will see how NAV adds new worksheet:
Hi
To create New Worksheet you can use like below.
XlWrkShtWriter := XlWrkBkWriter.AddWorksheet(SheetName); where you can refer Excel buffer table for XlWrkShtWriter and XlWrkBkWriter variables.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,113 Super User 2024 Season 2
Martin Dráb 229,918 Most Valuable Professional
nmaenpaa 101,156