2

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.

Vinay Sagar
  • 21
  • 3
  • 9
  • 2
    I would suggest you to try a solution and ask a specific question if you want to get help. Try pasting some of your code, that will definitely help you get an answer. – Andres D Oct 29 '14 at 15:01

2 Answers2

3

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.

Jmr
  • 12,078
  • 4
  • 39
  • 33
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
Neeraj V
  • 41
  • 3