web
You’re offline. This is a read only version of the page.
close
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 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 (2)
  • Suggested answer
    Marco Mels Profile Picture
    on at

    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.

  • Suggested answer
    DAnny3211 Profile Picture
    11,397 on at

    hi

    try this

    https://www.base64decode.org/

    DAniele

  • Suggested answer
    Nitin Verma Profile Picture
    21,708 Moderator on at

    Get an idea from the below link

    www.navwithnav.com/.../

  • gtr2 Profile Picture
    58 on at

    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,708 Moderator on at

    Hi,

    Try with the below link might be it help you

    www.j3ns.de/.../

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,010

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,270 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,085 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans