Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

165
Views
How to create JSON file from XLSX but with some values as arrays of strings

I am using the code provided by @Parijat in this question to parse XLSX data into JSON format. I have some columns that contain multiple values per cell separated by commas and I would like have these formatted as arrays of strings in the JSON output.

For example:

id    Conditions 
1     influenza,asthma
2     influenza
3     high-blood pressure, influenza

I would like the JSON to be:

{
"id":1,
"conditions":["influenza", "asthma"]
},
{
"id":2,
"conditions":["influenza"]
}.
{
"id": 3,
"conditions":["high-blood pressure","influenza"]
}

Could someone be kind enough to show me how to adapt the code in the other question to produce JSON like this?

If it helps, I know in advance which columns need to be output as an array, so I have their column indexes, or could move them all to the start or end of the xlsx file.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!