web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
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
    Microsoft Employee 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,423 Super User 2026 Season 1 on at

    hi

    try this

    https://www.base64decode.org/

    DAniele

  • Suggested answer
    Nitin Verma Profile Picture
    21,812 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,812 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,960 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,299 Super User 2026 Season 1

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 1,131 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans