1.7.3 • Public • Published

Excel CLI Tool

Tool used for transforming excel files


  • install nodejs and npm (the come packaged together when downloading node)
  • open up terminal or command prompt and cd into the project directory

project directory will be where the excel tool resides. example: C:\users\dan\downloads\exceltool This is where the package.json and readme file is located

  • run npm install
  • if you get errors, you might need to do sudo npm install or run the command.exe as an admin if on windows

How To Run

Prior to running: (Setting the output directory is optional if you do not need reports for automation purposes) go into excel/js/excelConfig.json change outputDirectory to a folder on your computer where output files will be saved to. example /users/dan/Downloads/ or C:\users\dan\Downloads\ The output files are mainly used for test automation.

In the project directory run: npm run exceltool

Then follow the prompts to get a generated file

Tips and Tricks

Type of file options:

  • All Ranked - all benes that have a rank number for each measure

  • All 616 - up to and including 616 ranked benes if they exist for each measure

  • All 248 - up to and including 248 ranked benes if they exist for each measure

  • Patient - Only fills out the patient qualified question to yes for all benes

  • NA - N/A's any cell that has data. (exception is prev 7 and discharge dates)

  • Blank - Clears out any cell that has data. (exception is prev 7 and discharge dates)

  • Other - Allows you to specifically set number of benes for each measure to fill out.

  • Errors - Fills out qualification question for one bene for each measure incorrectly producing an error on the ui

  • skip - Fills out bene info to skip the bene

  • random - Fills out random data for the benes (if skipped is set to no)

  • debug - adds some logging to the execution

  • verbose - adds stats to the execution

  • output reports - generates text files and a json to be used for other testing if needed.

Project Directory path for input and output files will check in the exceltool folder for files The files will need to be placed in the same folder as the package.json file in order to be picked up For entering some other path, make sure you have / or \ depending on your file system at the end of the path. You will get an error if you dont have a correctly formatted filepath mac example: /users/daniel/Downloads/ windows example: C:\users\daniel\Downloads\

Typically everything will be compiled, but if you do need to compile try the following:

  • To compile the code, run npm run compile in the project directory

(Need to have typescript installed globally to compile) npm install -g typescript to install typescript globally

Skipped because of age reason counts will only be counted when NOT generating random data. Same goes for data irregularities.

Using NPM Package with Cypress

There are 2 ways to use this tool.

  1. In cypress project directory
  • Run sudo npm i qpp-bsr-excel-tool
  • You can then run either npx exceltool (if you have npx) or ./node_modules/.bin/exceltool.

2)You can also install it globally.

  • sudo npm i -g qpp-bsr-excel-tool. Then just type in exceltool in your terminal and click enter.

cy.exec(npx exceltool --input="/users/danreale/Downloads/Org123-beneficiary-sample-list-without-data.xlsx" --output=/users/danreale/Downloads/Org123Bene616.xlsx --runtype=all --random=true, { timeout: 60000 }).its('code').should('eq', 0);

cy.exec(exceltool --input="/users/danreale/Downloads/Org123-beneficiary-sample-list-without-data.xlsx" --output=/users/danreale/Downloads/Org123Bene616.xlsx --runtype=all --random=true, { timeout: 60000 }).its('code').should('eq', 0);

Excel Data Load Tool Command Line

How to use:

exceltool --input --output options

Excel Examples

  • Enter data for specific amount of beneficiaries for each measure exceltool --patient=5000 --care1=1 --care2=50 --dm=3 --htn2=4 --ivd2=5 --mh1=6 --prev5=7 --prev6=8 --prev7=9 --prev8=10 --prev9=11 --prev10=12 --prev12=13 --prev13=14 --input=/Users/danielreale/Downloads/DanFileTest.xlsx --output=/Users/danielreale/Downloads/DanFileTestOut.xlsx

  • Example for filling out 15 care2 patients that qualify for sample with random answers exceltool --input=/Users/danielreale/Downloads/DanFileTest.xlsx --output=/Users/danielreale/Downloads/DanFileTestOut.xlsx --care2=15 --random=true

  • All 616 benes filled out for each measure consecutively exceltool --input=/Users/danielreale/Downloads/Dev986WithoutData.xlsx --output=/Users/danielreale/Downloads/Dev986Out9.xlsx --runtype=all

  • Minimum 248 benes filled out for each measure consecutively exceltool --input=/Users/danielreale/Downloads/Dev986WithoutData.xlsx --output=/Users/danielreale/Downloads/Dev986Out9.xlsx --runtype=min

  • Fills out only the patient info for all patients exceltool --input=/Users/danielreale/Downloads/Dev986WithoutData.xlsx --output=/Users/danielreale/Downloads/Dev986Out9.xlsx --runtype=patients Fills out the patient data as 'Yes' qualified for sample

  • Resets every measure and patient data back to N/A (Any cell that has a value, will be changed to N/A, with expception of predefined cells) exceltool --input=/Users/danielreale/Downloads/Dev986WithoutData.xlsx --output=/Users/danielreale/Downloads/Dev986Out9.xlsx --na=true

  • Randomized the answers/ Shows the verbose output of number of each answer exceltool --input=/Users/danielreale/Downloads/Dev986WithoutData.xlsx --output=/Users/danielreale/Downloads/Dev986Out9.xlsx --runtype=all --random=true --verbose=true

  • Skips Beneficiary Consecutively by setting Qualified to No-Other Approved CMS Reason exceltool --input=/Users/danielreale/Downloads/IMP969WithoutData.xlsx --output=/Users/danielreale/Downloads/IMP969Out929.xlsx --runtype=min --verbose=true --skipped=true

  • --runtype is optional (if you set this argument, you do not need to set the individual measures, otherwise you will need to enter each individual measure as an argument with the number of beneficiaries you want to enter data for)(type are all, min, patients)

  • --verbose is optional argument. Gives you count of the answers to the qualification quesstion for each measure.

  • --random is optional argument. use this if you want random answers to all measure questions.

  • Use exceltool --help for more info on the arguments and defaults

Deleting All Values from With Data Sheet

exceltool --input="/Users/danielreale/Downloads/v5.xlsx" --output="/Users/danielreale/Downloads/v5blankout.xlsx" --blank=true --verbose=true

npm version major npm version minor npm version patch

npm publish




Package Sidebar


npm i qpp-bsr-excel-tool

Weekly Downloads






Unpacked Size

598 kB

Total Files


Last publish


  • molindoz
  • azizakmeer
  • adilenghel
  • nominaman83
  • grooveisall
  • kramersb
  • tarikuzz
  • joshua.ewing-sb
  • ddhecker
  • trzash-6891
  • cruddyshad0w
  • rtdiggstown
  • rodmunoz
  • sb_kmr
  • sivasrinisb
  • walber.gonzalez
  • davidberry_sb
  • gokhale
  • petemckinneysb
  • sarah-adhocteam
  • cms-cis-qpp
  • bijujoseph
  • aaronmanne
  • kyleapfel
  • boristotle
  • chetanmunegowda
  • suchint.nagra
  • cmsds
  • scoringengine
  • djacksonsb
  • nicholascgates
  • pwolfertadhoc
  • ni.chia
  • clkawell
  • dlomax30
  • kimadhoc
  • alunpm
  • frederick.huang
  • tgroshsb
  • pstancic
  • john-manack
  • timwtoysb
  • sdbaradhoc