You need to sign in to do that
Don't have an account?

Extract SOQL as CSV
Hi - I'm a bit new to Apex programming and I have a quick question.
Can I export the contents of a SOQL query within an APEX Global class to a CSV file? I know that we can use the Data Tool and possibly a VF page, but my company wants this to happen automatically, without any human intervention. Is there a way to do this, and if so, does anyone have a link that I can use as a guide?
Thanks for your time,
Wes Cooper
You need firstly create list of records, then list is bind with visualforce page. Write this code on visualforce page.
Hi
what iam understanding you mean to say is can we export the data automatically by using data tool(dataloader)?
yes we can export the data automatically with out manually through dataloader by using comand line interface(CLI)
Please go through the following wiki page. This has the step by step instructions to execute a job using the Data Loader CLI.
http://wiki.developerforce.com/page/Using_Data_Loader_from_the_command_line