Hello,
For a customer I have created a report which builds an excelsheet with NAV data. It is used with NAV 2009 R2 and Excel 2003 in a Citrix environment.
The excel sheet is generated through the standard Excel buffer (table 370). Until last week the next steps are taken:
1. All the data is collected in the excel buffer
2. An excelsheet is created
3. The control is given back to the user
4. Excel is shown at once with all data
This week office 2003 is replaced with office 2010.
The same report shows an empty excelsheet and the filling of every cell is shown.
Is it possible to change the report so the whole excelsheet is shown at ones?
Thanks in advance.
0
Answers
I suppose You just fill in the values in the table, then call table 370 functions in this sequence:
ExcelBuf.CreateBook;
ExcelBuf.CreateSheet(SheetName,ReportHeader,CompanyName,UserID);
ExcelBuf.GiveUserControl;
What regards your issue:
CreateBook sets Excel application object to non Visible (You can find XlApp.Visible(FALSE); line in this function)
CreateSheet actually fills the data to Excel cells.
And there's a line switching Excel back to Visible in GiveUserControl.
So since You state that all the filling to Excel is actually visible - Either XlApp.Visible does not work (though I use excel 2010 and they do) or those are commented or something..
I guess the easiest way to find out is just by placing a breakpoint on these functions in your report, and check how Excel behaves..
I use the functions from table 370 as you have written.
I have used the debugger and excel is made invisible when using createbook.
Everything works ok when using the debugger.
When running the report normally, Excel is showing too soon.
In the old environment everything works fine.
So I can conclude the problem is not in NAV.
When I find a solution I will add it here.