Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Problem with Base64 conversion and Excel files

(0) ShareShare
ReportReport
Posted on by 50

Hello,

I have an application that gets Excel files encoded in Base64
I try to decode the Base64, put the obtained text into a blob to download it later with DownloadFromStream
But I get corrupted Excelfiles
I developped a little procedure (see link) to see if Base64-coding and Base64-decoding is altering the data.

procedure-ctrldl.jpg_2D00_640x480.jpg

The result of the procedure is :
Text File identical : True
Excel File identical : False
I tested the Base64 texts with https://base64.guru/converter/ and there seems to be no problem
Has somebody a hint to see where the problem comes from ?

  • Suggested answer
    Nitin Verma Profile Picture
    21,544 Moderator on at
    RE: Problem with Base64 conversion and Excel files

    Hi,

    Try with the below link might be it help you

    www.j3ns.de/.../

  • gtr2 Profile Picture
    50 on at
    RE: Problem with Base64 conversion and Excel files

    Hello Daniele Incalza : I already checked with https://base64.guru/converter/ and checking with https://www.base64decode.org/ confirmed my conclusions

    Hello Nitin Verma : I had a look to the code example, its does not what I am trying to show, meaning that have a given Base64-encoded string and I want to decode correctly to get a file that is not corrupted

    My little procedure is showing that for Base64 strings coming from an Excel files (after other testings for word and pdf files too) the decoding and re-encoding process alters the file.

    Normally I suppose that decoding a base64 string and re-encoding again should give the same as the original base64 string

  • Suggested answer
    Nitin Verma Profile Picture
    21,544 Moderator on at
    RE: Problem with Base64 conversion and Excel files

    Get an idea from the below link

    www.navwithnav.com/.../

  • Suggested answer
    DAnny3211 Profile Picture
    9,276 Moderator on at
    RE: Problem with Base64 conversion and Excel files

    hi

    try this

    https://www.base64decode.org/

    DAniele

  • Suggested answer
    Marco Mels Profile Picture
    on at
    RE: Problem with Base64 conversion and Excel files

    Hello,

    We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist. If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    www.dynamicsuser.net/.../14

    I will open this up to the community in case they have something to add.

    Thanks.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,141 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,881 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans