My CSV format is like below,

Course_Name,Offering_Id,Start_Date,End_Date,SPOC_ID

Learning 1,112323,18/01/2019,20/01/2019,676776
Learning 2,111232,19/01/2019,22/01/2019,898898
Learning 3,121232,18/01/2019,30/01/2019,989898
Learning 4,321232,18/01/2019,25/01/2019,767676


The code suggested by you as below,
readData() {
this.jdwHttp.get<string>('/assets/weekly_learning.csv').pipe(
map((csv: string) => csv.split('/n').map(line => line.split(','))),
tap(array => (this.csvData = array))
).subscribe();

And I am getting the below error while running,

[image: Capture.PNG]


On Friday, 18 January 2019 09:56:48 UTC+5:30, Sander Elias wrote:
>
> Hi Arindam,
>
> Something like this:
>
> csvData = [];
> readData() {
> this.http
> .get<string>('/assets/data.csv')
> .pipe(
> map((csv: string) => csv.split('/n').map(line => line.split(','))),
> tap(array => (this.csvData = array))
> )
> .subscribe();
> }
>
> In your service would do.
> Regards
> Sander
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to