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...
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,111 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,111 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
    134 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

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