AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 07.09.2009, 19:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,617 / 848 (80) +++++++
Регистрация: 28.10.2006
emeadaxsupport: How does the Export to Excel feature work under the hood?
Источник: http://blogs.msdn.com/emeadaxsupport...-the-hood.aspx
==============

One of the nice features of Dynamics AX 2009 is the Export to Excel that is available throughout the product and allows to content of a Grid to be exported to Microsoft Office Excel for further analysis. Sometimes however the feature does not work as expected. So for example Microsoft Office Excel is starting but the data from the Grid is not showing up.

The Export to Excel is not completely happening in the Dynamics AX Kernel but parts of the export logic are coded in X++:
  1. If you click at the button Export to Excel in any Form, the Dynamics AX Kernel is generating the list of data to be exported. The Dynamics AX Kernel takes here the formatted data as it is visible in the Grid.
  2. Next the Dynamics AX Kernel places this data in the Windows Clipboard, while the currently existing content of the Windows Clipboard is backed up.
  3. Then the Dynamics AX Kernel calls the X++ method performPushAndFormatting of the class SysGridExportToExcel. This method is instantiating Microsoft Office Excel using COM, pasting the data from the Windows Clipboard and applies some formatting to the inserted data.
  4. When the X++ part is finished the Dynamics AX Kernel places the original backed up content of the Windows Clipboard back.
The Windows Clipboard is playing a central role in the Export to Excel. Between the placing of the data in the Windows Clipboard and the retrieving of the data by Microsoft Office Excel several steps are happening. If for any reason the content of the Windows Clipboard is altered or replaced during this time the export will fail.

One cause of problems can be Add-Ins for Microsoft Office Excel. Add-Ins are loaded when Microsoft Office Excel starts and can manipulate the content of the Windows Clipboard before Dynamics AX had any chance to paste the content at a worksheet.

In order to find out what is happening during the export of data the Dynamics AX Debugger can be of a great help. Simply by putting a breakpoint at the beginning of the method performPushAndFormatting and checking the content of the Windows Clipboard while executing line after line.



Источник: http://blogs.msdn.com/emeadaxsupport...-the-hood.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
emeadaxsupport: How to fix SQL error: "Too many parameters were provided in this RPC request" Blog bot DAX Blogs 0 01.09.2009 15:05
emeadaxsupport: How to set the number sequence for Global Address Book when virtual companies are used Blog bot DAX Blogs 0 24.08.2009 14:05
emeadaxsupport: How to open an AX form from your own help Blog bot DAX Blogs 0 26.07.2009 15:07
Microsoft Dynamics CRM Team Blog: Dynamic Export to Excel feature – How to protect data over the wire Blog bot Dynamics CRM: Blogs 0 27.01.2009 10:05

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 22:39.