Navigate between Spreadsheets

dianageledianagele Member Posts: 14
I want to write data on one sheeet, select the next (pre-named) tab and write the second part of the data there.
1. I write the tabs OnPreReport.
2. Then I write the data, but don't know the command to "Select this-or-that" tab.

This is what I have so far:

Report - OnPreReport()
IF PrintToExcel THEN BEGIN
 CREATE(Excel);
//sheeet 1:
 Workbook := Excel.Workbooks.Add(-4167);
 Worksheet := Excel.ActiveSheet;
 Worksheet.Name := 'Name1';
//--- sheet 2:
Worksheet:=Excel.Sheets.Add();
Worksheet:=Excel.ActiveSheet;
Worksheet.Name:='Name2';
END;

Comments

  • j.marseloj.marselo Member Posts: 102
    there is no such function in standard NAV. the function is in Excel Buffer table. What you can use is Addcolumn function and addinfocolumn function.
    this will create 2 sheets in Excel, "Data" and "Info"
    Kind regards, Joe Marselo | see my NAV blog joemarselo.wordpress.com | twitter @joemarselo
  • dianageledianagele Member Posts: 14
    Figured this out.
    Way too simple.
    I was able to:
    open an Excel session if the request page has a checkbox checked.
    then, create a spreadsheet within each of the Report sections & write away.

    A lot of happy people now.
Sign In or Register to comment.