How to call exportDataStoreEntityToExcel on page load

Hi,

I want to export the data in excel on page load using ExportDataStoreEntityToExcel. how we can achieve this? I am successfully able to export the data on saveinto but here want to export on page load. Below is the code which i am trying. Code is not throwing any error but seems not calling this export service also.

local!exportDocId:
a!exportDataStoreEntityToExcel(
entity: cons!SCE_SITS_VW_INCIDENTS,

documentName: "test Report",
sheetName: "Test Report",
saveInFolder: cons!TEST_DOCUMENT_FOLDER,

onSuccess: a!save(
local!exportlink,
fv!newDocument
),
/*This displays an error if there is an issue executing the save*/
onError: a!save(
local!errorMessage,
"Error Exporting File to Excel"
)
),

  Discussion posts and replies are publicly visible