Hi,
Is it possible to run action Export to excel (shortcut: CTRL + E) in C/AL? Or this is standard method that it cannot be run by script?
Regards
Marcin
This is a shortcut handled by NAV Client binaries, not by C/AL code.
You could try to workaround it by usin SendKeys from windos shell, in order to mimic the Ctrl+E key press, but since the export functionality relies on currently open and active page activating it arbitrarily from the code might produce "funny" results (if you manage to force it to work using SendKeys in the first place)
This is a shortcut handled by NAV Client binaries, not by C/AL code.
You could try to workaround it by usin SendKeys from windos shell, in order to mimic the Ctrl+E key press, but since the export functionality relies on currently open and active page activating it arbitrarily from the code might produce "funny" results (if you manage to force it to work using SendKeys in the first place)
Thank you Sławek for response.
That's a shame. Why MS doesn't share this kind of scripts, instead they give us Excel Buffer to eksport data to excel or using .Net which is quite similar. It would be much faster to run page and call export data to excel function.
Answers
You could try to workaround it by usin SendKeys from windos shell, in order to mimic the Ctrl+E key press, but since the export functionality relies on currently open and active page activating it arbitrarily from the code might produce "funny" results (if you manage to force it to work using SendKeys in the first place)
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
That's a shame. Why MS doesn't share this kind of scripts, instead they give us Excel Buffer to eksport data to excel or using .Net which is quite similar. It would be much faster to run page and call export data to excel function.