I have a plan for users to use apex sql workshop interface for ad hoc queries.
They need to be able to export data to Excel.
Is there a direct way to do that in Apex?
If not, is there a way to save the result set of query to a CSV file?
While I don't recommend giving users access to SQL Workshop for ad-hoc queries (that is why Interactive Reports and Websheets where invented!), you can download to csv format by clicking on the Download link in the Object Browser when selecting the table.
Does that dump all the table data to an excel? i only want the query results (not whole table)?
Also, why you dont recommend using sql workshop for ad hoc queries. I assume you are concerned about Security.
My plan is to create an apex database account with READ-ONLY priviliges and maybe a few WRITES to some table that they might need to update. so I think i can control access via database account as desired.
About your idea on using interactive reports and worksheets, dont you have to develop the report for them more like using crystal report tool?