exporting a report to excel

MarocNavNoobMarocNavNoob Member Posts: 31
hello,
i'm trying to add a checkbox button which will help export the content of some reports to a excel sheet.
i'm using the excel buffer table as a record and a boolean in the request form to export to excel.
i have an example which i'm working on but its not working for me.

i have 6 functions
1- CreateExcelBook : create the excel using the createBook() function of the the Excel buffer table which works fine for me
2- MakeExcelInfo :

{ExcelBuf.SetUseInfoSheed;
ExcelBuf.AddInfoColumn(FORMAT(Text021),FALSE,'',TRUE,FALSE,FALSE,'');
ExcelBuf.AddInfoColumn(COMPANYNAME,FALSE,'',FALSE,FALSE,FALSE,'');
ExcelBuf.NewRow;
ExcelBuf.AddInfoColumn(FORMAT(Text020),FALSE,'',TRUE,FALSE,FALSE,'');
ExcelBuf.AddInfoColumn(FORMAT(Text019),FALSE,'',FALSE,FALSE,FALSE,''); }
ExcelBuf.NewRow;
ExcelBuf.ClearNewRow;
MakeExcelDataHeader;

from what i learned the SetUseInfoSheed is to give user the hand on the excel.
the NewRow and the AddInfoColumn is clear.
this functions is not working , i don't know why ?

3- MakeExcelDataHeader
4- MakeExcelDataBody
5- MakeExcelDataFooter


i'm calling the CreateExcelBook on the PostReport Event and the makeInfoExcel on the preReport Event. which works fin in an example i have. any idea plz

Comments

  • SogSog Member Posts: 1,023
    from what i learned the SetUseInfoSheed is to give user the hand on the excel. :|

    Setuseinfosheed/t (don't want to check atm) is to make an extra worksheet with information in it.
    Setuseinfosheet is to generate an excel with 2 generated worksheets in it's workbook instead of 1.
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • MarocNavNoobMarocNavNoob Member Posts: 31
    okey. thanks for the info.
    do you have any idea on what this code is not working for me.
  • SogSog Member Posts: 1,023
    sure, it's commented out: it's enclosed in brackets {}}{{}{ <- these things
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • MarocNavNoobMarocNavNoob Member Posts: 31
    yes, since i'm new in navision i didn't notice the brackets. now it works fine. thank you for the reply
Sign In or Register to comment.