Skip to main content

Notifications

Business Central forum
Suggested answer

Export Report to Excel with multiplesheets

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?
Categories:
  • 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,744 Moderator 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

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,524 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,469 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans