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
14af61cd
Commit
14af61cd
authored
Nov 12, 2015
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support multi sheet selected
parent
a3d79e61
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
10 deletions
+22
-10
example.js
example/example.js
+2
-1
output.json
example/output.json
+1
-1
place-sample.xls
example/place-sample.xls
+0
-0
index.js
lib/index.js
+19
-8
No files found.
example/example.js
View file @
14af61cd
...
@@ -2,7 +2,8 @@ var am_xlsx2json = require('../')
...
@@ -2,7 +2,8 @@ var am_xlsx2json = require('../')
am_xlsx2json
({
am_xlsx2json
({
input
:
__dirname
+
'
/place-sample.xls
'
,
input
:
__dirname
+
'
/place-sample.xls
'
,
output
:
__dirname
+
'
/output.json
'
output
:
__dirname
+
'
/output.json
'
,
sheet
:[
'
Worksheet
'
,
'
Sheet1
'
]
},
function
(
err
,
result
)
{
},
function
(
err
,
result
)
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
err
);
console
.
error
(
err
);
...
...
example/output.json
View file @
14af61cd
[{
"LatLng"
:
"51.57101, -158.57719"
,
"id"
:
"1"
,
"Place"
:
"Sit Amet Company"
,
"Address"
:
"P.O. Box 618, 2951 Tellus. Street"
,
"City"
:
"Raymond"
},{
"LatLng"
:
"10.90529, -49.37854"
,
"id"
:
"2"
,
"Place"
:
"Maecenas Ornare Ltd"
,
"Address"
:
"268-3937 In Rd."
,
"City"
:
"Abergele"
},{
"LatLng"
:
"44.29126, 98.64463"
,
"id"
:
"3"
,
"Place"
:
"Lorem Donec Elementum Foundation"
,
"Address"
:
"390 Libero Rd."
,
"City"
:
"Campochiaro"
},{
"LatLng"
:
"-56.84695, 119.54056"
,
"id"
:
"4"
,
"Place"
:
"Ac Orci Institute"
,
"Address"
:
"Ap #687-9187 Sociis Avenue"
,
"City"
:
"San Rafael"
},{
"LatLng"
:
"37.21794, -37.85875"
,
"id"
:
"5"
,
"Place"
:
"Dictum Corp."
,
"Address"
:
"467-982 Nec Road"
,
"City"
:
"Neufeld an der Leitha"
},{
"LatLng"
:
"-68.96956, 56.55191"
,
"id"
:
"6"
,
"Place"
:
"Tristique Ltd"
,
"Address"
:
"Ap #846-9215 Vestibulum Ave"
,
"City"
:
"Trivigno"
},{
"LatLng"
:
"-53.71245, -151.76491"
,
"id"
:
"7"
,
"Place"
:
"Posuere Company"
,
"Address"
:
"660-757 Id Rd."
,
"City"
:
"Aulnay-sous-Bois"
},{
"LatLng"
:
"-62.44848, 5.57356"
,
"id"
:
"8"
,
"Place"
:
"Aliquet Proin Velit Limited"
,
"Address"
:
"949 Lacinia Rd."
,
"City"
:
"Brest"
},{
"LatLng"
:
"75.43502, 56.06693"
,
"id"
:
"9"
,
"Place"
:
"Risus Quis Ltd"
,
"Address"
:
"5212 Aenean Road"
,
"City"
:
"Kumbakonam"
},{
"LatLng"
:
"38.97135, 178.67981"
,
"id"
:
"10"
,
"Place"
:
"Fermentum Fermentum Arcu Institute"
,
"Address"
:
"6756 Scelerisque Rd."
,
"City"
:
"Martigues"
},{
"LatLng"
:
"82.51778, 17.13118"
,
"id"
:
"11"
,
"Place"
:
"Vel Venenatis Inc."
,
"Address"
:
"835-7724 At Ave"
,
"City"
:
"Kln"
},{
"LatLng"
:
"-71.53692, -64.94888"
,
"id"
:
"12"
,
"Place"
:
"A Auctor Non Corporation"
,
"Address"
:
"P.O. Box 736, 6087 Eu Av."
,
"City"
:
"Parndorf"
},{
"LatLng"
:
"82.99532, 26.16053"
,
"id"
:
"13"
,
"Place"
:
"Tellus Corp."
,
"Address"
:
"2709 Dolor. Road"
,
"City"
:
"Llandovery"
},{
"LatLng"
:
"-75.65542, -89.79333"
,
"id"
:
"14"
,
"Place"
:
"Phasellus Associates"
,
"Address"
:
"7593 Tristique Rd."
,
"City"
:
"Walhain"
},{
"LatLng"
:
"-18.48161, 75.69634"
,
"id"
:
"15"
,
"Place"
:
"Nonummy Ac Feugiat Incorporated"
,
"Address"
:
"5525 Diam St."
,
"City"
:
"Kalken"
},{
"LatLng"
:
"-47.06441, -90.68196"
,
"id"
:
"16"
,
"Place"
:
"Et Associates"
,
"Address"
:
"1623 Mauris Street"
,
"City"
:
"Fratta Todina"
},{
"LatLng"
:
"17.26138, 121.07507"
,
"id"
:
"17"
,
"Place"
:
"Cras Vehicula Aliquet Ltd"
,
"Address"
:
"967-5727 Nec Road"
,
"City"
:
"Montes Claros"
},{
"LatLng"
:
"73.23786, -119.48126"
,
"id"
:
"18"
,
"Place"
:
"Augue Porttitor Foundation"
,
"Address"
:
"4075 Nec Road"
,
"City"
:
"Trivigno"
},{
"LatLng"
:
"84.41311, 49.99535"
,
"id"
:
"19"
,
"Place"
:
"Leo Elementum Ltd"
,
"Address"
:
"Ap #111-6239 Magna. Avenue"
,
"City"
:
"Tilly"
},{
"LatLng"
:
"-19.4723, -77.56953"
,
"id"
:
"20"
,
"Place"
:
"Arcu Institute"
,
"Address"
:
"135-8145 Porttitor Avenue"
,
"City"
:
"Gibsons"
},{
"LatLng"
:
"82.46026, 144.87263"
,
"id"
:
"21"
,
"Place"
:
"Imperdiet Ornare In LLP"
,
"Address"
:
"P.O. Box 282, 3522 Posuere Road"
,
"City"
:
"Rimbey"
},{
"LatLng"
:
"-33.16882, 124.14644"
,
"id"
:
"22"
,
"Place"
:
"Sollicitudin Adipiscing Ligula PC"
,
"Address"
:
"885-5593 A St."
,
"City"
:
"Fraser-Fort George"
},{
"LatLng"
:
"64.89148, -45.47237"
,
"id"
:
"23"
,
"Place"
:
"Semper Auctor LLP"
,
"Address"
:
"421-9756 Tempor Rd."
,
"City"
:
"Bondo"
},{
"LatLng"
:
"-80.17519, 26.93634"
,
"id"
:
"24"
,
"Place"
:
"Vestibulum Lorem Sit Associates"
,
"Address"
:
"P.O. Box 694, 6058 Eu, St."
,
"City"
:
"Uberaba"
},{
"LatLng"
:
"31.96596, -96.72662"
,
"id"
:
"25"
,
"Place"
:
"Sem Vitae Aliquam Inc."
,
"Address"
:
"6280 Semper. Ave"
,
"City"
:
"Morolo"
},{
"LatLng"
:
"-80.40702, 3.58034"
,
"id"
:
"26"
,
"Place"
:
"Tristique Ac Eleifend Corporation"
,
"Address"
:
"4049 Enim. St."
,
"City"
:
"Neudörfl"
},{
"LatLng"
:
"86.10018, -159.7974"
,
"id"
:
"27"
,
"Place"
:
"Sem Egestas Blandit PC"
,
"Address"
:
"P.O. Box 126, 3407 Semper St."
,
"City"
:
"Porto Cesareo"
},{
"LatLng"
:
"-81.74359, 16.59063"
,
"id"
:
"28"
,
"Place"
:
"Eu Accumsan PC"
,
"Address"
:
"768-7448 Dapibus Street"
,
"City"
:
"Floriffoux"
},{
"LatLng"
:
"79.47026, -175.29629"
,
"id"
:
"29"
,
"Place"
:
"Sit Amet Nulla LLP"
,
"Address"
:
"Ap #878-3934 Nisi. Rd."
,
"City"
:
"Wanzele"
},{
"LatLng"
:
"41.32625, 45.86809"
,
"id"
:
"30"
,
"Place"
:
"Non Nisi Incorporated"
,
"Address"
:
"6946 Ullamcorper Street"
,
"City"
:
"Varsenare"
},{
"LatLng"
:
"-65.46864, -90.3803"
,
"id"
:
"31"
,
"Place"
:
"Dictum Eu LLP"
,
"Address"
:
"926-3649 Non Rd."
,
"City"
:
"Cabras"
},{
"LatLng"
:
"75.89915, 169.22889"
,
"id"
:
"32"
,
"Place"
:
"Egestas Urna PC"
,
"Address"
:
"671-8058 Elit Ave"
,
"City"
:
"Le Havre"
},{
"LatLng"
:
"-83.34202, -126.50813"
,
"id"
:
"33"
,
"Place"
:
"Adipiscing Lobortis Risus Ltd"
,
"Address"
:
"Ap #398-6841 Duis Ave"
,
"City"
:
"Vaughan"
},{
"LatLng"
:
"-17.12166, -123.87437"
,
"id"
:
"34"
,
"Place"
:
"Est Industries"
,
"Address"
:
"Ap #306-4964 Auctor Avenue"
,
"City"
:
"Cartago"
},{
"LatLng"
:
"-7.84855, -105.98863"
,
"id"
:
"35"
,
"Place"
:
"Luctus Ipsum Leo Industries"
,
"Address"
:
"890-3090 Pharetra, Road"
,
"City"
:
"Wigtown"
},{
"LatLng"
:
"40.81283, 32.02616"
,
"id"
:
"36"
,
"Place"
:
"Molestie Ltd"
,
"Address"
:
"7863 Vitae Street"
,
"City"
:
"Saint-Quentin"
},{
"LatLng"
:
"-38.30278, 118.89481"
,
"id"
:
"37"
,
"Place"
:
"Tempus Non Lacinia Incorporated"
,
"Address"
:
"P.O. Box 502, 5854 Neque. St."
,
"City"
:
"Montgomery"
},{
"LatLng"
:
"24.0148, 152.2145"
,
"id"
:
"38"
,
"Place"
:
"Ullamcorper Magna Sed Institute"
,
"Address"
:
"P.O. Box 646, 7403 Mattis. Rd."
,
"City"
:
"Stirling"
},{
"LatLng"
:
"63.25201, -100.56368"
,
"id"
:
"39"
,
"Place"
:
"Sit Amet Incorporated"
,
"Address"
:
"7501 Proin Road"
,
"City"
:
"Salles"
},{
"LatLng"
:
"0.17881, 17.54778"
,
"id"
:
"40"
,
"Place"
:
"Molestie Corp."
,
"Address"
:
"783-5574 Placerat, Ave"
,
"City"
:
"North Vancouver"
},{
"LatLng"
:
"-77.41812, -3.94727"
,
"id"
:
"41"
,
"Place"
:
"Vel Arcu Curabitur Consulting"
,
"Address"
:
"654-1297 Nonummy Rd."
,
"City"
:
"Bhind"
},{
"LatLng"
:
"21.06717, -56.40321"
,
"id"
:
"42"
,
"Place"
:
"Ridiculus Mus Company"
,
"Address"
:
"3770 Eu St."
,
"City"
:
"Dover"
},{
"LatLng"
:
"6.21638, -175.53712"
,
"id"
:
"43"
,
"Place"
:
"Nec Cursus A Institute"
,
"Address"
:
"485-2231 Nunc Street"
,
"City"
:
"Portland"
},{
"LatLng"
:
"-24.00303, -2.60148"
,
"id"
:
"44"
,
"Place"
:
"Mus Proin Vel Industries"
,
"Address"
:
"P.O. Box 218, 4131 Molestie Road"
,
"City"
:
"Antey-Saint-Andrè"
},{
"LatLng"
:
"62.03496, -140.5954"
,
"id"
:
"45"
,
"Place"
:
"Nulla Foundation"
,
"Address"
:
"237-1728 Sit Av."
,
"City"
:
"Castelnovo del Friuli"
},{
"LatLng"
:
"-34.4318, -150.36376"
,
"id"
:
"46"
,
"Place"
:
"Lacinia At Iaculis Institute"
,
"Address"
:
"P.O. Box 799, 5175 Semper Av."
,
"City"
:
"Limbach-Oberfrohna"
},{
"LatLng"
:
"85.69717, -54.71731"
,
"id"
:
"47"
,
"Place"
:
"Enim Commodo Hendrerit Inc."
,
"Address"
:
"P.O. Box 547, 7593 Mollis. Av."
,
"City"
:
"Tramonti di Sopra"
},{
"LatLng"
:
"-31.13112, 155.67433"
,
"id"
:
"48"
,
"Place"
:
"Phasellus Nulla Integer Foundation"
,
"Address"
:
"4375 Scelerisque St."
,
"City"
:
"Emines"
},{
"LatLng"
:
"-57.10112, -68.57937"
,
"id"
:
"49"
,
"Place"
:
"Fringilla Purus Incorporated"
,
"Address"
:
"P.O. Box 886, 9686 Fermentum St."
,
"City"
:
"Crotta d'Adda"
},{
"LatLng"
:
"74.7515, 139.06724"
,
"id"
:
"50"
,
"Place"
:
"Vitae Inc."
,
"Address"
:
"Ap #753-7348 Ipsum St."
,
"City"
:
"Torrejón de Ardoz"
},{
"LatLng"
:
"85.08551, 167.93944"
,
"id"
:
"51"
,
"Place"
:
"Cursus LLP"
,
"Address"
:
"4578 Lacus Ave"
,
"City"
:
"Rouvroy"
},{
"LatLng"
:
"-64.97301, -151.03909"
,
"id"
:
"52"
,
"Place"
:
"Vulputate Nisi Sem Industries"
,
"Address"
:
"608-5606 Facilisi. Av."
,
"City"
:
"Loreto"
},{
"LatLng"
:
"39.19347, -12.69997"
,
"id"
:
"53"
,
"Place"
:
"Vel Convallis Corporation"
,
"Address"
:
"Ap #110-3109 Mauris Av."
,
"City"
:
"Nairn"
},{
"LatLng"
:
"80.4928, -84.12842"
,
"id"
:
"54"
,
"Place"
:
"Mi Company"
,
"Address"
:
"351-976 Lectus Rd."
,
"City"
:
"Zwevegem"
},{
"LatLng"
:
"47.15635, -0.99082"
,
"id"
:
"55"
,
"Place"
:
"Diam Institute"
,
"Address"
:
"8521 Vel Street"
,
"City"
:
"Oyen"
},{
"LatLng"
:
"87.77209, 47.82428"
,
"id"
:
"56"
,
"Place"
:
"Eros Nam Incorporated"
,
"Address"
:
"Ap #840-9093 Ipsum. St."
,
"City"
:
"Lummen"
},{
"LatLng"
:
"26.05166, -120.95108"
,
"id"
:
"57"
,
"Place"
:
"Et Ltd"
,
"Address"
:
"9670 Vel St."
,
"City"
:
"Castel del Giudice"
},{
"LatLng"
:
"-47.40552, 102.22544"
,
"id"
:
"58"
,
"Place"
:
"Pharetra PC"
,
"Address"
:
"Ap #683-6369 Placerat. Road"
,
"City"
:
"Santa Maria a Monte"
},{
"LatLng"
:
"-64.40535, -95.71762"
,
"id"
:
"59"
,
"Place"
:
"Facilisis PC"
,
"Address"
:
"Ap #690-1435 Eu Av."
,
"City"
:
"Narbonne"
},{
"LatLng"
:
"79.1964, -97.75551"
,
"id"
:
"60"
,
"Place"
:
"Eget Ipsum Industries"
,
"Address"
:
"P.O. Box 559, 4349 Phasellus Street"
,
"City"
:
"Riksingen"
},{
"LatLng"
:
"-14.80736, 27.28713"
,
"id"
:
"61"
,
"Place"
:
"Iaculis Enim LLP"
,
"Address"
:
"P.O. Box 256, 9628 Donec Ave"
,
"City"
:
"Glabais"
},{
"LatLng"
:
"-42.7284, -55.51311"
,
"id"
:
"62"
,
"Place"
:
"Aliquet Diam Sed Institute"
,
"Address"
:
"860-6626 Vitae Rd."
,
"City"
:
"Cannock"
},{
"LatLng"
:
"12.50041, 12.62255"
,
"id"
:
"63"
,
"Place"
:
"Non PC"
,
"Address"
:
"Ap #765-8129 Ullamcorper. Road"
,
"City"
:
"Beaumont"
},{
"LatLng"
:
"-13.34092, -125.76994"
,
"id"
:
"64"
,
"Place"
:
"Libero Incorporated"
,
"Address"
:
"478-3631 Vivamus Avenue"
,
"City"
:
"Emines"
},{
"LatLng"
:
"-29.51122, 15.61033"
,
"id"
:
"65"
,
"Place"
:
"Vestibulum Ut Eros PC"
,
"Address"
:
"8055 Ipsum. Av."
,
"City"
:
"Li'ge"
},{
"LatLng"
:
"-60.96111, 164.18439"
,
"id"
:
"66"
,
"Place"
:
"At PC"
,
"Address"
:
"1083 Ullamcorper. St."
,
"City"
:
"Coventry"
},{
"LatLng"
:
"29.58894, 39.10387"
,
"id"
:
"67"
,
"Place"
:
"Aliquet Ltd"
,
"Address"
:
"4031 A Avenue"
,
"City"
:
"Bahraich"
},{
"LatLng"
:
"74.74427, 74.10065"
,
"id"
:
"68"
,
"Place"
:
"Ac Urna Foundation"
,
"Address"
:
"532-9953 Aenean Street"
,
"City"
:
"Wepion"
},{
"LatLng"
:
"-43.77342, 175.53253"
,
"id"
:
"69"
,
"Place"
:
"Lacinia Foundation"
,
"Address"
:
"Ap #779-6232 Massa. Road"
,
"City"
:
"Sepino"
},{
"LatLng"
:
"11.53412, -52.64214"
,
"id"
:
"70"
,
"Place"
:
"Per Conubia Inc."
,
"Address"
:
"P.O. Box 777, 7591 Aenean Street"
,
"City"
:
"Junagadh"
},{
"LatLng"
:
"4.22511, -166.81963"
,
"id"
:
"71"
,
"Place"
:
"Posuere Vulputate Industries"
,
"Address"
:
"P.O. Box 829, 6022 Justo Av."
,
"City"
:
"Algeciras"
},{
"LatLng"
:
"-62.40871, -10.88041"
,
"id"
:
"72"
,
"Place"
:
"Fermentum Convallis Ligula PC"
,
"Address"
:
"P.O. Box 539, 6926 Placerat, Avenue"
,
"City"
:
"Largs"
},{
"LatLng"
:
"-55.14468, 26.7014"
,
"id"
:
"73"
,
"Place"
:
"Proin Sed Turpis Limited"
,
"Address"
:
"102-6716 Sed St."
,
"City"
:
"Talence"
},{
"LatLng"
:
"3.4261, 104.18583"
,
"id"
:
"74"
,
"Place"
:
"Aenean Incorporated"
,
"Address"
:
"7303 Dapibus Avenue"
,
"City"
:
"Baranello"
},{
"LatLng"
:
"19.90654, -41.0339"
,
"id"
:
"75"
,
"Place"
:
"Massa Incorporated"
,
"Address"
:
"P.O. Box 556, 9258 Ac St."
,
"City"
:
"Serralunga d'Alba"
},{
"LatLng"
:
"-57.57029, -60.01371"
,
"id"
:
"76"
,
"Place"
:
"Risus Quisque Company"
,
"Address"
:
"Ap #931-8017 Magna St."
,
"City"
:
"Fraser Lake"
},{
"LatLng"
:
"-51.96765, -77.81547"
,
"id"
:
"77"
,
"Place"
:
"Faucibus Orci Luctus LLC"
,
"Address"
:
"7546 Nec Rd."
,
"City"
:
"Chicoutimi"
},{
"LatLng"
:
"68.60154, 168.69579"
,
"id"
:
"78"
,
"Place"
:
"Mi Tempor Lorem Company"
,
"Address"
:
"P.O. Box 924, 3843 Eleifend Rd."
,
"City"
:
"Blumenau"
},{
"LatLng"
:
"-22.86386, -26.9201"
,
"id"
:
"79"
,
"Place"
:
"Proin Institute"
,
"Address"
:
"P.O. Box 287, 1411 At Street"
,
"City"
:
"Herentals"
},{
"LatLng"
:
"-40.37882, 41.29911"
,
"id"
:
"80"
,
"Place"
:
"Mattis Ornare LLP"
,
"Address"
:
"6600 Aliquam Street"
,
"City"
:
"Mal"
},{
"LatLng"
:
"64.95432, -130.3385"
,
"id"
:
"81"
,
"Place"
:
"Vitae Ltd"
,
"Address"
:
"P.O. Box 558, 6808 Ligula St."
,
"City"
:
"Warrnambool"
},{
"LatLng"
:
"-24.1152, 133.68675"
,
"id"
:
"82"
,
"Place"
:
"Eros Non Enim Foundation"
,
"Address"
:
"Ap #112-2340 Auctor Rd."
,
"City"
:
"Warburg"
},{
"LatLng"
:
"61.30075, -140.27208"
,
"id"
:
"83"
,
"Place"
:
"Eget Metus Eu Incorporated"
,
"Address"
:
"410-5564 Tellus Avenue"
,
"City"
:
"Lens-Saint-Remy"
},{
"LatLng"
:
"80.32492, 106.79806"
,
"id"
:
"84"
,
"Place"
:
"Luctus Felis Purus LLC"
,
"Address"
:
"Ap #611-528 Penatibus Rd."
,
"City"
:
"Burlington"
},{
"LatLng"
:
"71.45604, 113.5865"
,
"id"
:
"85"
,
"Place"
:
"Blandit Nam Institute"
,
"Address"
:
"P.O. Box 127, 3419 Porttitor Av."
,
"City"
:
"Labrecque"
},{
"LatLng"
:
"12.45278, 165.07714"
,
"id"
:
"86"
,
"Place"
:
"Aliquet Libero Foundation"
,
"Address"
:
"516-7755 Sociis Rd."
,
"City"
:
"Elingen"
},{
"LatLng"
:
"-14.23961, -65.1275"
,
"id"
:
"87"
,
"Place"
:
"Et PC"
,
"Address"
:
"Ap #511-5645 Pede. Avenue"
,
"City"
:
"Dokkum"
},{
"LatLng"
:
"-38.47975, -122.45247"
,
"id"
:
"88"
,
"Place"
:
"Urna LLC"
,
"Address"
:
"P.O. Box 170, 2010 Sit St."
,
"City"
:
"Fort Smith"
},{
"LatLng"
:
"21.77841, 60.1088"
,
"id"
:
"89"
,
"Place"
:
"Aliquet Vel Ltd"
,
"Address"
:
"P.O. Box 338, 9846 Tempor Road"
,
"City"
:
"Gosselies"
},{
"LatLng"
:
"-6.20494, -158.34552"
,
"id"
:
"90"
,
"Place"
:
"Leo Elementum Sem LLC"
,
"Address"
:
"596-1366 Suspendisse St."
,
"City"
:
"Birmingham"
},{
"LatLng"
:
"-77.39258, -40.90295"
,
"id"
:
"91"
,
"Place"
:
"Dui Nec Tempus Corporation"
,
"Address"
:
"7179 Libero. Ave"
,
"City"
:
"Shipshaw"
},{
"LatLng"
:
"30.61518, 71.18764"
,
"id"
:
"92"
,
"Place"
:
"Nec Urna Foundation"
,
"Address"
:
"Ap #130-3867 Nisl Rd."
,
"City"
:
"Wandsworth"
},{
"LatLng"
:
"-52.07628, -9.55097"
,
"id"
:
"93"
,
"Place"
:
"Nullam Velit Dui Associates"
,
"Address"
:
"Ap #420-3957 Quam, St."
,
"City"
:
"Sant'Onofrio"
},{
"LatLng"
:
"33.64646, -93.71374"
,
"id"
:
"94"
,
"Place"
:
"Ultricies Limited"
,
"Address"
:
"6692 Iaculis Rd."
,
"City"
:
"Dordrecht"
},{
"LatLng"
:
"-73.08226, 123.04064"
,
"id"
:
"95"
,
"Place"
:
"Neque Venenatis Lacus LLC"
,
"Address"
:
"Ap #423-7526 Leo. Avenue"
,
"City"
:
"Lokeren"
},{
"LatLng"
:
"-71.14857, 145.87821"
,
"id"
:
"96"
,
"Place"
:
"Mauris Corporation"
,
"Address"
:
"Ap #278-8076 Consectetuer Avenue"
,
"City"
:
"Freiberg"
},{
"LatLng"
:
"-45.39033, 179.37989"
,
"id"
:
"97"
,
"Place"
:
"Pede Nunc LLC"
,
"Address"
:
"Ap #334-210 At Street"
,
"City"
:
"Altidona"
},{
"LatLng"
:
"63.72966, 14.56556"
,
"id"
:
"98"
,
"Place"
:
"Pellentesque Habitant Morbi Inc."
,
"Address"
:
"Ap #293-5759 Fusce Ave"
,
"City"
:
"Milazzo"
},{
"LatLng"
:
"53.56758, 85.5962"
,
"id"
:
"99"
,
"Place"
:
"Egestas Rhoncus PC"
,
"Address"
:
"Ap #820-888 Aliquam Road"
,
"City"
:
"Pozantı"
},{
"LatLng"
:
"46.59251, 106.74746"
,
"id"
:
"100"
,
"Place"
:
"Ut Tincidunt Vehicula Inc."
,
"Address"
:
"P.O. Box 910, 9112 Tristique St."
,
"City"
:
"Tumbler Ridge"
}]
{
"Worksheet"
:[{
"id"
:
"1"
,
"Place"
:
"Sit Amet Company"
,
"Address"
:
"P.O. Box 618, 2951 Tellus. Street"
,
"City"
:
"Raymond"
,
"LatLng"
:
"51.57101, -158.57719"
},{
"id"
:
"2"
,
"Place"
:
"Maecenas Ornare Ltd"
,
"Address"
:
"268-3937 In Rd."
,
"City"
:
"Abergele"
,
"LatLng"
:
"10.90529, -49.37854"
}],
"Sheet1"
:[{
"id"
:
"1"
,
"Place"
:
"Sit Amet Company"
,
"Address"
:
"P.O. Box 618, 2951 Tellus. Street"
,
"City"
:
"Raymond"
,
"LatLng"
:
"51.57101, -158.57719"
},{
"id"
:
"2"
,
"Place"
:
"Maecenas Ornare Ltd"
,
"Address"
:
"268-3937 In Rd."
,
"City"
:
"Abergele"
,
"LatLng"
:
"10.90529, -49.37854"
},{
"id"
:
"3"
,
"Place"
:
"Lorem Donec Elementum Foundation"
,
"Address"
:
"390 Libero Rd."
,
"City"
:
"Campochiaro"
,
"LatLng"
:
"44.29126, 98.64463"
},{
"id"
:
"4"
,
"Place"
:
"Ac Orci Institute"
,
"Address"
:
"Ap #687-9187 Sociis Avenue"
,
"City"
:
"San Rafael"
,
"LatLng"
:
"-56.84695, 119.54056"
},{
"id"
:
"5"
,
"Place"
:
"Dictum Corp."
,
"Address"
:
"467-982 Nec Road"
,
"City"
:
"Neufeld an der Leitha"
,
"LatLng"
:
"37.21794, -37.85875"
}]}
\ No newline at end of file
\ No newline at end of file
example/place-sample.xls
View file @
14af61cd
No preview for this file type
lib/index.js
View file @
14af61cd
...
@@ -23,7 +23,7 @@ function XLSX_json(config, callback) {
...
@@ -23,7 +23,7 @@ function XLSX_json(config, callback) {
function
CV
(
config
,
callback
)
{
function
CV
(
config
,
callback
)
{
var
wb
=
this
.
load_xlsx
(
config
.
input
)
var
wb
=
this
.
load_xlsx
(
config
.
input
)
var
json
=
this
.
to_json
(
wb
);
var
json
=
this
.
to_json
(
wb
,
config
);
var
output
=
config
.
output
;
var
output
=
config
.
output
;
if
(
config
.
output
!==
null
)
{
if
(
config
.
output
!==
null
)
{
var
stream
=
fs
.
createWriteStream
(
output
,
{
var
stream
=
fs
.
createWriteStream
(
output
,
{
...
@@ -39,13 +39,24 @@ function CV(config, callback) {
...
@@ -39,13 +39,24 @@ function CV(config, callback) {
CV
.
prototype
.
load_xlsx
=
function
(
input
)
{
CV
.
prototype
.
load_xlsx
=
function
(
input
)
{
return
xlsx
.
readFile
(
input
);
return
xlsx
.
readFile
(
input
);
}
}
CV
.
prototype
.
to_json
=
function
(
workbook
)
{
CV
.
prototype
.
to_json
=
function
(
workbook
,
config
)
{
var
result
=
{};
var
result
=
{};
workbook
.
SheetNames
.
forEach
(
function
(
sheetName
)
{
var
target_sheet
=
config
.
sheet
;
var
roa
=
xlsx
.
utils
.
sheet_to_row_object_array
(
workbook
.
Sheets
[
sheetName
]);
if
(
target_sheet
==
null
){
if
(
roa
.
length
>
0
){
workbook
.
SheetNames
.
forEach
(
function
(
sheetName
)
{
result
[
sheetName
]
=
roa
;
var
roa
=
xlsx
.
utils
.
sheet_to_row_object_array
(
workbook
.
Sheets
[
sheetName
]);
}
if
(
roa
.
length
>
0
){
});
result
[
sheetName
]
=
roa
;
}
});
}
else
{
target_sheet
.
forEach
(
function
(
sheetName
)
{
var
roa
=
xlsx
.
utils
.
sheet_to_row_object_array
(
workbook
.
Sheets
[
sheetName
]);
if
(
roa
.
length
>
0
){
result
[
sheetName
]
=
roa
;
}
})
}
return
result
;
return
result
;
}
}
\ No newline at end of file
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