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 :
Microsoft Dynamics NAV (Archived)

Write data from NAV to a CSV-file using UTF-8 format

(0) ShareShare
ReportReport
Posted on by

Thema:

Write data from NAV to a CSV-file.

If I declare the File variable as a File I got wrong letters in CSV-file especially for Danish characters æ, ø and å.

Therefore I use an Automation

'Microsoft ActiveX Data Objects 2.8 Library'.Stream

Then I can encode the file in UTF-8-format.

 

The pseudo code is as following

 

CLEAR(FFile);
CREATE(FFile);
FFile.Open;
FFile.Charset('UTF-8');

Repeat

  FFile.WriteText(Data)

Until  end_of_data

 

The problem is that all data in CSV-file is in the same line instead of a line per data. No linefeed after exported data record

How can I avoid this ?

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Probably this will solve your problem:  FFile.WriteText(Data,1)

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans