Breaking news from around the world
Get the Bing + MSN extension
Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, PowerApps, Microsoft Flow, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates to Dynamics 365Release overview guides and videos Release Plan | Early Access Availability
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming TechTalks
I have an issue regarding export data in CSV
when I export the data into CSV formate data comes into " " but user don't need " " so how can I remove " " from CSV in coding, please suggest any idea
Any reason for not using data management feature your requirement ?
Anyways take a look at below link and see if it helps you.
Which class you are using to do your export ?
I am already referring that link but it does not work for me in D365 and I m using CoomaStreamIo class for export the data
So use the CommaTextStreamIo class instead, and follow what the link Sukrut Parab sent you.
I have not testet this in D365FO, but had the same problem as you in AX2012, and the solution there was to use TestIO instead.
already check that use textIo but in that also data is coming in " "
Hmm that's weird, can you please post your code, then I will take a look.
sorry but code is confidential simply I use commaStreamIo.writeExp([here I passed data ]) and save and open but data coming in " "
Ok so if you do this instead you do not get " in the file.
private void TestFileWriteTextStreamIo()
TextStreamIo io = TextStreamIo::constructForWrite();
container outData = ["Field1","Field2"];
const str fileName = "testfile.txt";
System.IO.Stream stream = io.getStream();
stream.Position = 0;
System.IO.StreamReader reader = new System.IO.StreamReader(stream);
str csvFileContent = reader.ReadToEnd();
And for next time, make a simple example of the code you are having problems with, that way its easier to help you = More chance someone will.
Thanks, Rudi Hansen
it is working for me but in CSV also', ' is removed
Sorry forgot that part, you need to set the out field delimiter with io.outFieldDelimiter(",");
On CommaStreamIO the default out field delimiter is "," but on TextStreamIO its blank or nothing, so it needs to be set.
Thank you so much Rudi-Hansen
It is work for me my issue is resolved.....
One again Thanks.
as your suggestion, I changed the class but one issue is occusr when I open it in notepad there is one line data coming in two-line because there is no scroll available.
so for that please provide any solution
Not sure what you mean.
Just making a guess, /n in the text will give you a line change.
Thanks, Rudi for reply
I want to say when I open the file in notepad there is no vertical scroll is working because of that data coming in two-line
when I am using CommastreamIo then it is coming in one line
Sorry writing this on my phone from Bali.
Thanks for the reply,
It is not working it fetch all the data in one line
there is no solution to add vertical scroll while we open it in notepad
Also in Notepad you can open Format menu and uncheck "Word wrap" if you want also long lines to be shown on one line. This is just an option on how Notepad shows it, it has nothing to do with the file contents.
Here's some discussion on the topic: answers.microsoft.com/.../a43e504d-5e78-4c20-b5fa-51f76bec48a5
However I'm quite sure your business users are not using Notepad to handle the CSV files. Am I right?
The Word wrap in Notepad has nothing to do with your file. It's simply a property in Notepad that impacts how the text is displayed on your Notepad window when you view some file.
Exactly the same file will look different in Notepad, based on that setting. And if you change your Notepad's settings, it will have absolutely no impact on how the bank worker sees it.
It's not much different than changing your monitor's brightness and contrast when looking at a picture. The picture itself stays the same, and if you email it to your friend, your monitor's settings don't have impact on how your friend sees the photo on his/her monitor.
I think you are now concentrating on something that is not a problem at all.
No business user opens CSV in Notepad. Either some software reads the CSV that you exported from D365FO, or an user opens it in Excel. And neither of these cases will ever use word wrap.
For Notepad I already shared a link about changing the default setting. But that's a setting of each user, not the file.
I think that there is no problem left to solve. If you are unsure, you can of course verify with your customer if they think it's a problem that Notepad might wrap the text (just like it does with any other file in the world, not just your file). But I think you can trust that it's ok now.
Business Applications communities