I think you should use store statement in the script to store raw data in the csv format.
From UI the data get exported in excel format but it would take a long if data size is huge.
Check this link in case the indicated extension may help to export in csv from UI.
Hi Thanks for the reply. It worked for me also.
We need to expand pivots it worked. Is there any way I can keep a button and do the same stuff.
Like 'Export Table', underneath it runs the load/store script what ever and downloads file?
This is my primary query. Using a button.
But anyway thanks though! Your reply helped me.