Home > Forum > Forms > Export data to CSV file.

Export data to CSV file.
0

Hello
Is there a way to export data to specific csv file?
I want to create one either as attachment, or saved directly on comuter/server.
This should be button on form.

MVP

Hi Rafał,
Unfortunatelly I don't think there is any way to export data to csv file - the only place where i could find "CSV" in docs is Report Server config.
You can export to Excel from reports, and data tables on forms - could you give us some use case - what do you need those csv file for?

It should be rather easy to create PowerShell script, which could use Webcon API to get data and upload .csv as attachment. (might be not possible in SaaS environments)

MVP
In reply to: Konrad G

Hi, did you manage to do this on version 2023?

Hi Konrad,

you can use the following SQL to create a plain text file using the "Add attachment" action. 1205 is a multiline text field in which I stored the prepared CSV content.

SELECT convert(varbinary(max),'{1205}') AS Content, 'test.csv' AS FileName

I used this SQL to create the CSV content
select string_agg(Column1 + ';'+Column2+';'+Column3, Char(10)) as CSV
from (
select {DCNCOL:179} as Column1, {DCNCOL:180} as Column2, {DCNCOL:178} as Column3
from WFElementDetails
where DET_WFDID = {WFD_ID}
and DET_WFCONID = {WFCON:1201}
) temp

Best regards,
Daniel

Privacy overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognizing you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.


To see a full list of the cookies we use and learn more about their purposes, visit our Privacy Policy.