Adding images to an excel file to be used on import for profile images?

Adding images to an excel file to be used on import for profile images?

  

Hi, how do I add images to an excel file to bring them into a mobile app as a data entity? I m using Office 2013. Do I add the images to the excel file as an object or as a URL path or insert them directly and scale them down to fit each block??

How do I get this to recognise the images as binary? I added the images to an excel file as an object with a link to the file. How do you get images into the app via excel..can't seem to find any advice on it anywhere? The text data comes in fine but not the images..

I can't see that an Excel import with Binary Data can work.  I created an Entity with 2 Attributes... 1 for Text, 1 for Binary Data.  When I fill in the Record Definition of the Excel To Record List Action, I get this message...

Invalid Excel Handling
ExcelToRecordList1 'Record Definition' cannot contain entities/structures with 'Binary Data' data type attributes.

Further, from what I'm reading, the Excel file must be uploaded first.  The Upload process would have to upload not only the excel file but also all the Linked Objects.

There's an article about Import Excel files here...

https://www.outsystems.com/help/servicestudio/9.0/Designing_Actions/Import_from_MS-Excel_to_Record_List.htm

In this article there is a section titled Excel Data Types to OutSystems Data Types.  Binary Data is not in this list.

I don't work with Excel a lot, but it looks like images are not really linked to any specific cell... they float.

I did go through the process of creating a test Excel file and added images... but even a Navicat Excel Import to a MySQL Table did not import any images.

Does the source file have to be Excel with Images?

You can have the images encoded in base64 in your excel file.

When importing the file, convert the (text) base64 field to BinaryData using the TextToBinaryData action (from the BinaryData extension).

Starting with base64 image strings in an Excel file, I might just keep them in base64 in OS.

I just need the ability to hold 21 profile pics in a database entity so they sink up to their relative profile name? You would have thought Outsystems would just allow you to add them to the user login area why is it so difficult to add that ability..

Hi Zapptaa,

Your requirement doesn't seem to be usual. And as everything in life, the unusual is not addressed by the defaults in any new platform ("native" Mobile applications in OutSystems are in its first major version).

So, I don't think it is fair to complain (while is your right).

If you have the location of the files, you can add it to the excel as a new column (instead of an object), adapt the structure to hold this info and change your bootstrap to load the file based on this column and store the content in the binary field of the record you are saving.

Take a look at this forge component: https://www.outsystems.com/forge/component/1633/file-plugin/

Another option is to do convert your images to base64 and add the string to the column (adapt your structure) and than change your bootstrap to save your images to database, directly as base64 or converting them to binary again.

Cheers,
Eduardo Jauch

Hi Zapptaa,

If I was on your shoes I would go with a .zip file containing all the needed images. Since they're profile pictures you can add a field to your user_excel import like "picture filename" so you can map it when you unzip your file.

So basically:

- Import users with external mapping field for the pictures (pic filename)

- Unzip your files, and for each one of them query which user has that filename associated so you can build the relationship between them.

Hope it helps.

Nice solution, Henrique :)

Thanks Eduardo :)

Thanks for all the suggestions guys I will give them a go. Thanks for your support  :) 

Zapptaa wrote:

I just need the ability to hold 21 profile pics in a database entity so they sink up to their relative profile name? You would have thought Outsystems would just allow you to add them to the user login area why is it so difficult to add that ability..

I'm still trying to understand the requirement.  It sounds as though you don't really need or want an excel file.  Rather, you're just looking for a way to load Profile Images into a table.  When a user logs in, their image (based on login) will be retrieved and displayed.  Am I way off... or is that what you'd like to accomplish?