Created
November 30, 2016 01:47
-
-
Save bright23/9690fc22bab668426a1cd448902902c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Excel = require('exceljs') | |
var fs = require('fs') | |
var util = require('util') | |
var targetExcelPath = "リスト.xlsx" | |
// ワークブック指定 | |
var workbook = new Excel.Workbook(); | |
// ファイルを読み込み | |
workbook.xlsx.readFile(targetExcelPath).then(function () { | |
workbook.eachSheet(function(worksheet, sheetId) { | |
}); | |
// | |
for(var i=2;i<=451;i++){ | |
var str = ""; | |
for(var j=1;j<=1;j++){ | |
str += sheet1.getCell(i, j).value + ", "; | |
} | |
console.log(str); | |
// writeFileSync(filename,data) writeFile(filename,data,callback) | |
fs.writeFile('write.txt', str, function(err){ | |
console.log(err); | |
}) | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment