Skip to main content
February 27, 2017
Question

Is possible to export the data on a form into a spreadsheet (preferably append data to an existing spreadsheet) when the user presses a button on the form?

  • February 27, 2017
  • 1 reply
  • 305 views

Is possible to export the data on a form into a spreadsheet (preferably append data to an existing spreadsheet) when the user presses a button on the form? If so how would I go about doing that?

This topic has been closed for replies.

1 reply

Karl Heinz  Kremer
Community Expert
Community Expert
February 27, 2017

All you can do is to export the data as a text file, which means it will be saved as a tab delimited text file, which you can then import into e.g. MS Excel and convert to a spread sheet. See here for more information: Acrobat DC SDK Documentation

When you use this method from within a form, the method will prompt the user for a path to save the file to. If you want to save to a specific location, without the user having to select that location, you will have to use a "privileged context", which means you will have to install a script file on every computer that needs to save this data. You can see more about how to do that in this tutorial: https://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript

This will only allow you to save a new file, it will not append data to an already existing file. If you need that, then the only way to accomplish this is by writing VBA code in Excel that will extract data from the PDF file and either create a new Excel spreadsheet, or attach the data to an existing one. See here for some rough ideas about how to do that: Reading PDF Form Fields with VBA - KHKonsulting LLC  - if you need help with this type of application, that's what I do for a living as part of my consulting business. Feel free to get in touch with me, my contact information is on my profile page.