134
Views
8
Comments
Challenge with importing and exporting binary data in Excel.
Application Type
Reactive
Service Studio Version
11.54.58 (Build 63262)

Hello Team,


I have a requirement for one of my projects to export and import binary data (PDF/Word) within Excel. However, we lack an option to directly export binary data. Therefore, I've opted to convert the binary to base64/text during the export process and then convert it back to binary when importing the data into another table. Unfortunately, I'm encountering discrepancies in the binary data. It appears to be incorrect, and I'm unable to obtain the correct data.


I require assistance in addressing this issue with importing and exporting binary data in Excel. Could you please provide guidance or support on this issue?


Thanks,

Abinaya

2023-05-02 10-33-02
Madhuri Patil

Hi @Abinaya Chinnadurai,

when you are converting the binary to base64/text  and when your converting it again is that format same ?



UserImage.jpg
Abinaya Chinnadurai

Yes @Madhuri Patil , the format remains same. however, when attempting to view the uploaded file, it displays as an error file.

2021-11-12 04-59-31
Manikandan Sambasivam

Hi Abi, are you looking to achieve this in OutSystems, or would you prefer to use a .NET extension to achieve the result? What are your expectations? 

UserImage.jpg
Abinaya Chinnadurai

Hi Mani,

My sole intention is to export and import binary data (PDF/Word) within Excel. I'm just wondering if there's any method within OutSystems to accomplish this or if we need to resort to using a .NET extension. Have you encountered a similar situation before?

Thanks,
Abinaya

2019-01-07 16-04-16
Siya
 
MVP

Please share the OML having the sample implementation of what you could do so far. I believe you are trying to achieve Excel -> Insert -> Object ( PDF or Word ) in OutSystems.

UserImage.jpg
Abinaya Chinnadurai

Hello Siya ,

Yes am trying to import and export Binary data  (PDF/Word)  within Excel.

Please find the Samplke App oap and OML file .


Thanks,

Abinaya

Sample App.oap
SampleApp.oml
2019-01-07 16-04-16
Siya
 
MVP

I understand you want to show a list of employees in a table and allow users to upload binary data (like photos and PDFs) for each row, then export this data to Excel. Directly copying binary data into a cell won't work; instead, you need to embed the data as OLE objects. Underlying library which Advanced Excel uses is EPPLus and that does not support OLE Objects. 

Suggested Approach

  1. Store Binary Data:

    • Create a separate entity in your database to store the binary files associated with each employee.
  2. Export to Excel:

  3. Alternative Approach:

    • Upload the files (binary data) to a cloud service and embed the URLs in the Excel file.
    • If cloud storage is not an option, create an anonymous page that accepts an ID to uniquely identify and serve each file, and embed these URLs in your Excel file.

Hope this clarifies.

UserImage.jpg
Abinaya Chinnadurai

Thank you for providing the detailed explanation,The suggested approach makes sense. 

 I'll proceed with implementing one of these approaches and keep you updated on the progress. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.