Expand my Community achievements bar.

Export "Image Field" to Excel file

Avatar

Former Community Member

So I have a form created in LiveCycle Designer ES.

The form contains the following fields which all export well into a CSV file which can be easily copied over to a formatted Excel template.

  1. Text Fields
  2. Check Boxes
  3. Date/Time Fields

It also contains the following items which are ignored when exporting to a CSV file.

  1. Text
  2. Image
  3. Button

I recently tried to add a "Image Field" that is an editable field in the form, in the hope that the image could be added to the row of cells in the CSV file. (which converted the images into code rather than displaying the image)

I discovered one way to embed an image in an excel cell, by adding it within a comment.

I'm wondering if it's possible to edit the "Image Field" so that when the PDF forms are exported to a CSV file the image can be embedded within a comment.

I have my doubts considering CSV files are pretty basic file types but am wondering if there's another way to accomplish what I'm trying to do.

3 Replies

Avatar

Level 10

Hi,

Most fields can be set to export data in them, like textfields, numericfields, checkboxes, etc.

Objects that do not allow the user to input data are not exported. For example a text object contains a string, but the user cannot interact with this at runtime. The button can be interacted with (clicking) but it does not contain data. The image object contains an image in Base64 format, but the user cannot change it at runtime. All of these objects will not export for these reasons.

If you want an image in the form to export, then you could use an imagefield object. If you don't want the user to interact/change the image at runtime you will need a small script in the docReady event of the imagefield:

this.access = "readOnly";

I would not go down the route of comments.

Hope that helps,

Niall

Avatar

Former Community Member

Hi,

I do want the user to interact/change the image at runtime, but am looking for a way to have the image embedded when exported to a Excel file or similar table view.

I did use an imagefield although when exported to CSV it has the image in multiple lines of XML code in multiple cells.

Because the XML Source converts images into code I'm wondering if there is a way for Excel to be able to read the code (thus rendering back an image). Or potentially have the form not convert the image to XML at all and treating the image like an attachement.

If displaying an image in an Excel file is not possible then perhaps at least allowing the imagefield to be editable at runtime but not show up as field in the CSV file. This way at least the CSV file is a reference point back to the form that contains the image.

Avatar

Level 10

Hi,

When an image (eg JPEG, or similar) is brought into the XFA Form, it is converted to a Base64 format.

Have a look at John Brinkman's blog (http://blogs.adobe.com/formfeed/2011/05/recover-an-embedded-image.html), which includes a link to a website that can convert the Base64 format back to an image format (eg JPEG or similar): http://webnet77.com/cgi-bin/helpers/base-64.pl.

Other than that you are not easily going to be able to display the image from the XFA Form in Excel.

Does that make sense?

Niall