Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
am-xlsx2json
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Aksimaya
am-xlsx2json
Commits
a3d79e61
Commit
a3d79e61
authored
Nov 11, 2015
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
missing output
parent
649d15fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
index.js
lib/index.js
+11
-3
No files found.
lib/index.js
View file @
a3d79e61
var
fs
=
require
(
'
fs
'
);
var
xlsx
=
require
(
'
xlsx
'
);
var
cvcsv
=
require
(
'
csv
'
);
var
mime
=
require
(
'
mime
'
);
exports
=
module
.
exports
=
XLSX_json
;
...
...
@@ -24,8 +23,17 @@ function XLSX_json(config, callback) {
function
CV
(
config
,
callback
)
{
var
wb
=
this
.
load_xlsx
(
config
.
input
)
var
csv
=
this
.
to_json
(
wb
);
return
callback
(
null
,
csv
);
var
json
=
this
.
to_json
(
wb
);
var
output
=
config
.
output
;
if
(
config
.
output
!==
null
)
{
var
stream
=
fs
.
createWriteStream
(
output
,
{
flags
:
'
w
'
});
stream
.
write
(
JSON
.
stringify
(
json
));
return
callback
(
null
,
json
);
}
else
{
return
callback
(
null
,
json
);
}
}
CV
.
prototype
.
load_xlsx
=
function
(
input
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment