How to read/write from/to an excel using NodeJS - Protractor?

二次信任 提交于 2019-12-24 05:35:26

问题


Might be a basic question. But since I am new to protractor, I definitely need some help!

How to read/write from/to an excel using NodeJS - Protractor?

Can someone explain with an example?

My intention is to Parameterize my scripts using NodeJS - Protractor with the help of excel.


回答1:


Protractor has no specific support for Excel itself, but it runs inside Node.JS, so you can use any Node module that works with excel. https://www.npmjs.org/package/excel-parser looks promising.




回答2:


To perform read and write operation on excel sheet we need node application and exceljs library installed.

To install exceljs library type npm install exceljs and [press enter].

Refer below link, it contains code for,

  1. Add sheet to new excel file
  2. Add row in new sheet
  3. Edit existing excel file
  4. Read data from excel

Links

  1. Code to perform write operation
  2. Code to perform read operation


来源:https://stackoverflow.com/questions/26616522/how-to-read-write-from-to-an-excel-using-nodejs-protractor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!