Question: I am trying to process an excel file with ~600k rows and ~10 columns.

I want to execute some program line by line (or row by row) as if it is an iterator (like txt/csv files). However, if I use `xlrd` or `pandas` to read the excel file, it takes ~2-3min for opening the file.

I wonder if it is possible to read the excel file line by line efficiently so that, for example, I can verify my program with the first 10 rows without waiting for a long time for every trial.

Edit: Thank you for suggesting to convert the excel file to a csv before processing. However, I have to create an one-click program to the user. So, I still hope to find out a way to directly read the excel file efficiently, if possible.

Answer: 
Each element of the array is an object. And object doesn't have a `forEach()` method. You could try the following function

```js
ngOnInit() {
  this.data.forEach(item => {
    for (const key in item) {   // <-- `item.forEach()` won't work because it's an object
      item[key].forEach(subItem => {
        if (subItem.dataType === 'DD') {
          subItem.selectedData = +(subItem.selectedData || 0);
        }
      })
    }
  });
  console.log(this.data);
}

```

I've modified your [Stackblitz](https://stackblitz.com/edit/angular-w68cfg)
Try this 

```js
this.data  = [ { "player settings": [ { "id": 1, "labelName": "site language", "labelValue": [ { "id": 1, "languageName": "ARABIC", "language": "لغتك", "languageCode": "AE" }, { "id": 2, "languageName": "CHINESE", "language": "你的语言", "languageCode": "ZH" }, ], "dataType": "DD", "selectedData": "2" }, { "id": 2, "labelName": "subtitle language", "labelValue": [ { "id": 1, "languageName": "ARABIC", "language": "لغتك", "languageCode": "AE" }, { "id": 2, "languageName": "CHINESE", "language": "你的语言", "languageCode": "ZH" }, ], "dataType": "DD", "selectedData": "1" }, ] }, { "channel": [ { "id": 11, "labelName": "channel label", "dataType": "TX", "selectedData": "jhfh" } ] }, { "others": [ { "id": 16, "labelName": "others label", "dataType": "TX", "selectedData": "dhgdhg" } ] } ];

for (let key in this.data) {
    Object.values(this.data[key])[0].forEach(obj => {
      if (obj.dataType === "DD") {
        obj.selectedData = +(obj.selectedData || 0)
      }
    });
 }

 console.log(this.data);
```