-1

Is there a tool somewhere that already does this ? I have seen this link:

SO link

But no relavent answer was given, there is also links, SO links and converters out there for xlsx to JSON, but have not found anything the other way around

An example conversion:

JSON:

{
"name" : "Joe",
"_id" : 7
}

Excel:

name  Joe
_id   7

'name' and 'joe' being in adjacent but separate cells\columns.

Community
  • 1
  • 1
  • 1
    After reading that link, did you come up with how you wanted the json objects mapped to the spreadsheet cells? if so, you should include them in your question. – Colin D Dec 11 '12 at 21:54

3 Answers3

1

I do not know any generic API to do this work. But, if u already have a "mapper" for your json, you could generate the xls using the apache POI API easily.

nms
  • 325
  • 1
  • 14
  • ah yes I forgot about this, I specifically see this: http://poi.apache.org/spreadsheet/index.html –  Dec 11 '12 at 22:23
0

I am closing this,I decided to use json all the time instead of trying to convert back and forth.

0

You can do it very easy with Alasql console utility:

node alacon "select * into json('cities.json') from xlsx('cities.xlsx',{headers:true})"

To use Alasql console utility install Node.js and then install Alasql npm package.

agershun
  • 4,077
  • 38
  • 41