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...
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)
  • Abdullah Javed Profile Picture
    5 on at
    RE: How to download the CSVBuffer data in Business Central

    Thanks, Hasnain Ali. it's working.

  • Verified answer
    Hasnain Ali Profile Picture
    132 on at
    RE: How to download the CSVBuffer data in Business Central

    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 

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,035 Moderator on at
    RE: How to download the CSVBuffer data in Business Central

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

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

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,035 Moderator on at
    RE: How to download the CSVBuffer data in Business Central

    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

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 3,152

#2
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 2,944

#3
Sohail Ahmed Profile Picture

Sohail Ahmed 2,444 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans