Reports to Excel

Hi,

I’ve seen a pair or reports that allow’s user to export data to Excel, but there are too many code lines to do it. I would like to know if there’s any way to export automatically a report to excel with no or less programming.

Thanks :slight_smile:

If it were possible with no code, don’t you think those reports you mentioned would have been programmed that way? [:)]

There is no easy way to export a report to Excel. You will have to go through the Excel buffer table. Take a look at the G/L Budget form and the reports that it uses for an example. You could also use the export to Office functionality used in 5.0, if you are on 5.0 exe’s.

Jajaja I thought about that too, but I thank that maybe code lines were to add additional info, on the other hand… we are working with NAV 5 and use the “export to excel” functionality but it only works with list forms, not with reports. Anyway I’m not sure if that could be possible because reports don’t get only record info with the data items, in many others I do some operations.

Is true that “export to excel” only works with list forms or I’m wrong?

Thank you

I have been watching the “Excel threads” of the forum and found this… http://dynamicsuser.net/forums/p/13170/63387.aspx#63387

The problem is that I have to create a var xlApplication, type Automation, subtype ‘Microsoft Excel 11.0 Object Library’.Application, but when I’m gonna save it always display this error message “The variable XLAPPLICATION::WORKBOOKPIVOTTA is defined more than once. An example could be: ‘File’ exists as both a data type and a global variable”.

I understand what it means but I’m not declaring any “pivotta” var and I tried to declare this var in new forms, tables and everywhere, but always shows same error. Any idea?

That error can happen a lot in NAV 5.0. Export object has txt. Then open TXT file and you will that even WORKBOOKPIVOTTA is defined twice. Delete one of the events and import it again to Nav. I hope it helps

Excelent Nuno, that’s solved.

I’ve been practising with Excel Buffer and it’s really easy to use but I need more functionality, I will have to “fight” with Automation.

Thanks :slight_smile:

Anybody knows how to create diferent sheets with the Excel Buffer?, for example to create one “Resume” and other “Detailed”. This would be the perfect solution of my problem.

Thanks developers :slight_smile: