CreateBookAndOpenExcel function in DBC 365

rnjbngrnjbng Posts: 80Member
Hi Folks -

The function CreateBookAndOpenExcel is not supported in Extension development. Does anyone know any alternative solution for this issue. Many Thanks for your help.

local procedure CreateExcelbook();
begin
ExcelBuf.CreateBookAndOpenExcel('',Text012,'',COMPANYNAME,USERID);
ERROR('');
end;

ERROR
The type or method 'CreateBookAndOpenExcel' cannot be used for 'Extension' development.

Thanks
RJ.

Comments

  • bineshbinesh Posts: 2Member
    //Create a Procedure CreateExcelBook()

    //In this function again call the standard functions from table 370 as shown below.

    local procedure CreateExcelBook()
    begin
    TempExcelBuffer.CreateNewBook('Customers');
    TempExcelBuffer.WriteSheet('Customers', CompanyName(), UserId());
    TempExcelBuffer.CloseBook();
    TempExcelBuffer.OpenExcel();
    end;

    //Note: for full code see in the bottom i have attached a report for exporting.
    Screenshot taken from mobile so please zoom In for better view.
    akpda5k8vtdv.jpg
    ______________________________
    Kindly tick on Verified Answer if you satisfied with my conclusion.
    Thanks & Best Regards
    Binesh Singh Rajput
    (MCTS, MS, MCP)
  • rnjbngrnjbng Posts: 80Member
    Many Thanks Binesh, this is very helpful.
Sign In or Register to comment.