Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline maxthekokusaiwarrior  
#1 Posted : Thursday, March 20, 2014 3:48:52 AM(UTC)
maxthekokusaiwarrior

Joined: 11/4/2013(UTC)
Posts: 18

Hi guys,

Delta Engine is able to read CSV (comma separated values) files? There are a lot of libraries around the web for it, but i don't want to use any external libraries with Delta, to ensure portability. Thank you in advance.

Max

Wanna join the discussion?! Login to your forum accountregister a new account. Or Connect via Facebook Twitter Google

Offline mc-kay  
#2 Posted : Thursday, March 20, 2014 12:01:01 PM(UTC)
mc-kay

Medals: Admin

Joined: 8/24/2011(UTC)
Posts: 138
Location: Hannover

Thanks: 1 times
Was thanked: 12 time(s) in 7 post(s)
No, the Engine just has build-in support for XML and Json.
However, I think the real thing you want to do is creating your own ContentType that use CSV as data-source.
Our editor guy will write a tutorial next week how to do this.
Offline maxthekokusaiwarrior  
#3 Posted : Thursday, March 20, 2014 12:21:09 PM(UTC)
maxthekokusaiwarrior

Joined: 11/4/2013(UTC)
Posts: 18

Thank you very much for the help Smile
Offline Benjamin  
#4 Posted : Thursday, March 20, 2014 1:21:23 PM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
This sounds quite easy, maybe just use File.ReadAllLines(textFile) and then split each line with .Split(new[] { ',' }). Of course integrating it as ContentData is more safe and allows you to switch to Xml or Json without having to change your code, plus it will work on all platforms.
Offline maxthekokusaiwarrior  
#5 Posted : Thursday, March 20, 2014 4:09:57 PM(UTC)
maxthekokusaiwarrior

Joined: 11/4/2013(UTC)
Posts: 18

Thanks Benjamin,

my worries comes just from the requirement to design a portable solution. I will wait the new tutorial about custom content with Delta 1.1 ThumpUp
Offline Benjamin  
#6 Posted : Thursday, March 20, 2014 6:08:44 PM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
While File.Open from \Content folder is not supported on non windows platforms, we can easily add support for it, reading text files is always possible on all platforms :)

But lets see what solution our editor guy comes up with.
Rss Feed  Atom Feed
Users browsing this topic
OceanSpiders 2.0
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.056 seconds.