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

Did you know that with WEBCON you can automate virtually any process? Even baking cookies 🍪
 
Speaking of cookies: we use the ones that are essential for our website to function properly, as well as additional ones that help us customize our content to your preferences. If you don’t mind cookies, click Accept. If you want to learn more, explore settings.
Settings