Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'd like to be able to export data from Umbraco Forms (Entries) in the same format you get when you download from the backoffice. I've looked at the Forms APIs RecordStorage, FormsStorage, and things like ExportToExcel but can't seem to assemble them together to get what I need. The biggest problem I'm facing is the disconnect between the field labels and the data; the JSON+SQL storage makes brute forcing the whole thing messy.
In short, I just want to know if there is a public API in Umbraco Forms to export the exact data I'd get by clicking the "Export" button on the Entries page.
In Umbraco Forms it does not export to CSV, due to many problems users reported due to data submitted containing comma's etc that would then thus break the structure of the CSV file.
So now Umbraco Forms directly exports to Excel file instead because of this.
I am curious in what you are trying to achieve if you want to call this directly from code, rather than use the Umbraco Forms UI.
If you are wanting to add a new export option type such as saving this to a CSV file then you could create a new export provider class.
But I am not 100% sure if that is what you are trying to achieve.
Once I get a clearer idea, I can help a bit more.
However here is a way to invoke the excel export provider using code
var excelProvider = Umbraco.Forms.Core.Providers.ExportTypeProviderCollection.Instance.GetProviderInstance(Guid.Parse(Core.Constants.ExportTypes.Excel));
Hope this is enough to get you started to what you would like to do.
Thanks Warren. I will take a look at this and see if it does what I need. Also, if it's supported in the version of Forms we're using.
In short, my client has a process that reads the exported .csv file (our version exports .csv--is that different now?) and imports the data into their ERP software. The problem is that someone has to log in and manually download the file and copy it to a server. I'm trying to automate that process for them.
Hope that makes sense. If there's a better way please let me know!
Where do you put this code to invoke the excel export provider?
Well you could do that and upload an exported file for them.
But have you thought about creating a custom workflow provider for them.
So that every form submission is submitted to the ERP system directly if it has an API perhaps? This means you would not need to create some form of scheduled task to automate creating the export file & doing the upload, additionally the client would then have always upto date data in their ERP system.
Yeah, that's something we'll be doing also, and will probably become the main way to ship the data at some point. We started down the path of exporting data because we have several forms with lots of submitted data, and their ERP system doesn't currently have an exposed API to push to. Corporate IT, firewalls, security concerns, all things out of our control. :)
I'm using Umbraco Forms 4.1.0 and the option to export is exporting to CSV. Can you guide me on how I can make the amends to export that to Excel instead (due to the comma from the users while entering the form is causing the issues when I display the exported CSV).
Hi, Travis Nelson. I appreciate it. But you can try ZetExcel for export data to excel C#.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted