Export grid to Excel with images

Looking for a way to export grid data WITH attachments.

Perfect world solution would be to download as excel and keep attachments. This would be the most preferred solution if there was a script or extension/app/block allowing to export a view to google sheets or to excel, so that it is still a spreadsheet data but with attachments loaded into the corresponding cells.

I did manage to use a google sheets formula to convert url’s into images with ‘=image()’ … that being said once I tried downloading to excel it again does not show the images. So maybe as a backup solution is anyone aware of a formula in excel that can be quickly applied to convert a batch of urls into images in adjacent cells?

With Excel you can grab data from the internet. I has been a while since I have done it but you can:

  1. Open Excel to a new workbook
  2. Navigate to Data and choose from Web
  3. Open your Airtable accounts page and go to the API documentation and get a URL. Something like
https://api.airtable.com/v0/appXXXXXX/Table%202?api_key=keyXXXXXX&maxRecords=50&view=Grid%20view
  1. Paste the URL into the Excel popup
  2. Now you can add the query to your book
  3. This will give you URL for the image
  4. Add some VBA like this for excel to get that image file:
Sub InstallPictures()
    Dim i As Long, v As String
    For i = 2 To 1903
        v = Cells(i, "B").Value
        If v = "" Then Exit Sub
        With ActiveSheet.Pictures
            .Insert (v)
        End With
    Next i
End Sub

Or you can download the CSV, this will give you the file name and the URL. You will need to separate them and then use the VBA above to grab the image file.

There is also an excel plugin (non free but has a trial) from CDATA i have not used it.

1 Like

And on November 1st 2022, all those URLs will not work any longer. :expressionless:

If you build systems that have dependencies on Airtable attachment URLs, you have three avenues going forward:

  1. Build your own CDN and include in the extraction process a re-instantiation of the attachment documents in that CDN;
  2. Include in the extraction process a re-instantiation of the attachment documents in a different repository that will sustain access for your external solution;
  3. Of course, Excel is capable of storing documents inside cells, but this will require some clever VBScript. Importing attachment URLs as a CSV will not help - you need to muscle through this with script.
1 Like

It looks like he is getting data using the REST API. So he should get an expiring url that will work for the time it takes to get the image.

However, the api call doesn’t quite right to me. It doesn’t specify which record, will only get 50 records, and doesn’t specify which field. This usage of the API key could also be risky, depending on where in the workbook it is stored, who else has access to the workbooks, and if the file is ever shared with anyone else in the future.

@matt_stewart1

This is so incredibly easy to do with Make.com, and it doesn’t require any knowledge of coding or scripting at all.

It even uses the =IMAGE(“URL HERE”) formula that you already know so well from Excel and Google Sheets.

This process is the exact same for both Microsoft Excel 365 and Google Sheets, but here are example screenshots of how easy it is to search for records in Airtable and then send all of those records to Google Sheets with images intact:

p.s. If you’d like to hire an expert Airtable consultant to help you set this up, feel free to reach out to me through my Airtable consulting website.

1 Like

Indeed, you have to finish the play by getting and sustaining the attachment. Nowhere in that process is the URL transformed from a reference into a value (i.e., the image or document itself).

And how [exactly] will that work with a signed URL that has expired after a few hours?

Um… because it only takes a millisecond to process, not a few hours?

1 Like

And what is your definition of “process”?

An Image() formula in Google and Excel is a live formula - always refreshing. It is not designed like Airtable’s attachment system that reads the image, makes a copy, and hosts it in a new CDN location.

2 Likes

Oh, well dammit! :man_facepalming: :crazy_face:

I didn’t know that, but that makes 100% perfect sense… and thank you for pointing that out, @Bill.French!

If that’s the case, then my immediate solution above won’t work.

Then @matt_stewart1 could only successfully use my solution by permanently storing his Airtable images in a cloud drive somewhere that results in a permanent & always-accessible URL.

He could do this by adding another step in the middle:

1 Like

Indeed. It’s why I painstakingly called out this requirement in my response.

This demonstrates why it’s really important to carefully write out the requirements before writing the implementation approach. :wink: You want to ensure there are no surprises on Nov 1st.

Airtable has made this more difficult for everyone! But they didn’t want to be in the CDN business.

Oversimplification. They didn’t want to charge you more for being forced to be in a business that is not core to their skills.

Yeah, I had this in the back of my mind as I was responding. Ultimately I am glad we have continued discussion on the topic.

wow…

  1. what is happening on Nov 1?
  2. so that means I have a hassle of needing to upload images to both AT and to an external source, then additionally paste url to external source images in another field, then export to excel, then copy data from cdv to a template that is prebuilt with the conversion of url to image? That sounds… wonderful :frowning:

Assuming I wanted to spend an extra 15 mins on each and every attachment every day, is there a way for AT to load external URL as image within the cell? This way I can at least reduce process slightly buy not needing to upload the image to AT?

You’re acting frustrated because Airtable doesn’t let you work more efficiently… with Microsoft Excel? A competing product that Airtable has nothing to do with? I agree that Airtable could make it easier if they wanted to, but (a) they don’t want to, and (b) the vast majority of people who move from Excel to Airtable don’t use Excel anymore. Excel is also not designed to be an image management app. Considering the changes coming on November 1st to Airtable, it is unlikely that this will ever get easier. People have given you a variety of great ideas above, including myself.

Hey Matt,

We have a Google Sheets Table Sync automation in our On2Air Actions app for Airtable that can do exactly what you’re needing.

This specific tutorial below doesn’t showcase the Image part, but gives you an idea of what it does.You’ll just need to add the type="image" in your Sheets template for the image column.

You can try it out with the free trial or we can get you set up and going with a demo

@Hannah_Wiginton Where does On2Air Actions store the images?

I get it Scott, except for the fact that very few organizations work independently and for majority of the world excel is still the king of spreadsheet shares. We have a lot of partners that require excel shares and templates completed, with regular updates. I can not share an AT view as that would not meet their company guidelines. So while I understand its not AirTables problem and there are albeit lengthy workarounds, I feel like downloading to a usable excel format other than CSV would be in AT’s best interest.

They offer some form of connection to google sheets, but images again don’t get sent.
The offer some form of excel, but no images.

Meanwhile Google sheets offers full xlsx download and import, etc.

So I don’t think its a crazy ask to have some reasonably easy form of exporting data to share outside of AirTable users.

@matt_stewart1

I hear you. It’s unfortunate that Airtable has made this way more difficult than it needs to be. In fact, this used to be extremely easy in Airtable until they decided to shut down images from the outside world.

I do not agree with their decision, but then again, I don’t agree with much of what they do. :joy: :sweat_smile:

I come from the world of developing professional enterprise database systems, so all of Airtable’s curious product choices are extremely frustrating to me.

1 Like