Angular:Cannot read properties of undefined (reading ‘0’)

Issue

This Content is from Stack Overflow. Question asked by Happy

I want to import an excel with this code but I get this error

Angular Ag Grid Excel Import

Cannot read properties of undefined (reading '0')

This File import
Can this type of file be imported?

Book.csv

1,chocolate,brown,10
2,gum,red,11
3,juice,yellow,5

I read the app.component.ts file it says that I can import 4 columns.

app.component.ts


    var columns = {
        'A': '',
        'B': 'Make',
        'C': 'Model',
        'D': 'Price'
    };




Solution

This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?