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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

How to download the CSVBuffer data in Business Central

(0) ShareShare
ReportReport
Posted on by 5

Hi,

I'm trying to download a CSV file (Created with CSV Buffer)

Using procedure: 

TempCSVBuffer.SaveData();
But it has an On-prem scope.
and I also want to change the separator from " , " to " ; "

pastedimage1680170933755v1.png

Can anyone help with resolving this problem?

I have the same question (0)
  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,161 Moderator on at

    You have to go through a stream to download the content,

    Erik has made a great video about this that can be good to watch.

    www.youtube.com/watch

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,161 Moderator on at

    Here is also some additional info about handling files though a stream.

    learn.microsoft.com/.../file-downloadfromstream-method

  • Verified answer
    Hasnain Ali Profile Picture
    136 on at

    Hi Abdullah,

    You will have to use SaveDataToBlob procedure and DownloadStream to download it.
    For this, convert csv to InStream. You can use Temp Blob.

    Example:

    TempCSVBuffer.SaveDataToBlob(TempBlob, ';');

    ';' is the seperator here.

    TempBlob.CreateInStream(InStream, TEXTENCODING::UTF8);

    DownloadFromStream(InStream, '', '', '', 'Your file name here with extension');

    Hope this will work 

  • Abdullah Javed Profile Picture
    5 on at

    Thanks, Hasnain Ali. it's working.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,857 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,047 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans