Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

Export Report to Excel with multiplesheets

(0) ShareShare
ReportReport
Posted on by 50
Hi, i struggle with Export Report to Excel with multiplesheets.
I have 2 checkbox on report, Customer, and Vendor. Export depends on the what checkbox is typed.
Any ideas?
  • Suggested answer
    Amit Baru Profile Picture
    Amit Baru 3,025 on at
    RE: Export Report to Excel with multiplesheets

    hi,

    Creation of export to Excel Report.

    https://erpconsultors.com/export-to-excel-report-in-business-central/

    Regards

    Amit Sharma

    www.erpconsultors.con

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    RE: Export Report to Excel with multiplesheets

    No the Excel buffer is easier to use from a codeunit than from a report.

    Or if you use it in a report it should be a processing only report.

    But you could also use the Excel report layout to do it.

    docs.microsoft.com/.../users-use-excel-design-layouts-reports

    www.youtube.com/watch

  • Tony00001 Profile Picture
    Tony00001 50 on at
    RE: Export Report to Excel with multiplesheets

    This one i should use in PreReport?

  • Suggested answer
    Amit Baru Profile Picture
    Amit Baru 3,025 on at
    RE: Export Report to Excel with multiplesheets

    Hi,

    In Excel Buffer Table there is a function for creating new sheet in one Excel document.

    procedure SelectOrAddSheet(NewSheetName: Text)
        begin
            if NewSheetName = '' then
                exit;
            if IsNull(XlWrkBkWriter) then
                Error(Text037);
            if XlWrkBkWriter.HasWorksheet(NewSheetName) then
                XlWrkShtWriter := XlWrkBkWriter.GetWorksheetByName(NewSheetName)
            else
                XlWrkShtWriter := XlWrkBkWriter.AddWorksheet(NewSheetName);
        end;
    Regards
    Amit Sharma

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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans