API & Developers

API & Developers

Connect with other developers from around the world and collaborate on ideas using the Smartsheet API.

Has anyone been able to successfully upload a .pdf file to a row using VBA?

✭✭✭
edited 02/10/25 in API & Developers

Hello, I've been able to load a .pdf file to a specific row on my sheet. However, the file isn't converted correctly when using MS Access 16 VBA on Windows. I've tried using bytearray, ADODB.stream, Base64 encoded, and multiple other variations that AI has recommended, but I'm not able to read the uploaded file using any of them. I've manually uploaded the file, and it has no issues. So, I know the original file is not corrupt, and it is something with reading the file and passing it that it's not able to read the uploaded pdf. Has anyone been able to do a successful upload and read using API 2.0?

Answers

  • Employee

    Hi @tommyrossman!

    I haven’t personally created a similar solution, but I can provide you with our API documentation covering Attachments for reference:
    Smartsheet API - Attachments.

    I couldn't find other recent similar posts, so if you don’t receive a response from the Community, consider checking out Stack Overflow to connect with other developers for more help.

    I hope this helps!

    Cheers,
    Isaac.

    Need more information? 👀 |Help and Learning Center
    こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 |Global Discussions

  • Thanks @Isaac A. I'm at a loss. I've read that many times, and I can get the file to attach to the row, but it's not able to be read/opened. I've tried a very basic file, even one that has no text. I suspect there be something wrong with the file length or the format of the file that I am sending when converting in VBA. Unfortunately, I'm not finding anything related to file uploads and VBA in Stack Overflow, but I'll try to chat up some developers over there. Thanks again.

Trending in API & Developers