web
You’re offline. This is a read only version of the page.
close
Skip to main content
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 58

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 ?

I have the same question (0)
  • Suggested answer
    Nitin Verma Profile Picture
    21,625 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
    58 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,625 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
    11,282 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sumit Singh Profile Picture

Sumit Singh 2,814

#2
Sohail Ahmed Profile Picture

Sohail Ahmed 2,681 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 2,363 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans