Add new sheet

toscaletontoscaleton Member Posts: 14
Hi i want to do a report who can export to excel, i can do it but i can´t add new sheets. I want to add many sheets that i need.

Thank you

Comments

  • pduckpduck Member Posts: 147
    So how do you create your Excel file? Using the automation I think. Have a look at the Worksheets-Object (not Worksheet !).
  • toscaletontoscaleton Member Posts: 14
    So how do you create your Excel file? Using the automation I think. Have a look at the Workheet-Object.

    Worksheet-object¿? where¿? in the object designer can´t find it, the code unit 7311 Whse. Worksheet-Create¿?

    Thanks
  • toscaletontoscaleton Member Posts: 14
    toscaleton wrote:
    So how do you create your Excel file? Using the automation I think. Have a look at the Workheet-Object.

    Worksheet-object¿? where¿? in the object designer can´t find it, the code unit 7311 Whse. Worksheet-Create¿?

    Thanks
    i try to find this but i can´t, i´m nobel user in automations, can you explain to me thanks.
  • vijay_gvijay_g Member Posts: 884
    table 370(excel buffer) and see functions how they can help you.
  • toscaletontoscaleton Member Posts: 14
    vijay_g wrote:
    table 370(excel buffer) and see functions how they can help you.

    Hi, in excel buffer can´t create more than one sheet in excel or i don´t know how. I need help please.
  • vijay_gvijay_g Member Posts: 884
    try...
    Excelbuffer.createbook;
    Excelbuffer.creatsheet('sheet1',' ',' ',' ');
    Excelbuffer.creatsheet('sheet2,' ',' ',' ');
    Excelbuffer.creatsheet('sheet3',' ',' ',' ');
    Excelbuffer.giveusercontrol;
    
    now in excel it will create six sheet three are "sheet1","sheet2","sheet3" and remaning three is default.
  • krikikriki Member, Moderator Posts: 9,110
    [Topic moved from 'NAV Three Tier' forum to 'NAV/Navision Classic Client' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • HanenHanen Member Posts: 281
    Add function in excel buffer 370:
    AddSheet()
    XlWrkBk := XlApp.ActiveWorkbook;
    XlWrkSht := XlWrkBk.Worksheets.Add;
    

    and then call this function after each createsheet();
    Regards

    Hanen TALBI
  • HanenHanen Member Posts: 281
    How can I put each data on the right sheet?
    Regards

    Hanen TALBI
  • DenSterDenSter Member Posts: 8,305
    Assign each sheet to its own variable.
Sign In or Register to comment.