ExcelJS: Parsing Worksheet row values for specific JSON

Suljettu Julkaistu 2 vuotta sitten Maksettu toimituksen yhteydessä
Suljettu

I have the following Excel Worksheet called `Calendar Config`:

[![excel screenshot][1]][1]

[1]: [login to view URL]

Desired JSON:

{

"name": "Standard",

"validFrom": "2021-01-01T00:00:00.000Z",

"validTo": "2021-12-31T00:00:00.000Z",

"useHolidays": true,

"workingDays": [

{

"dayIndex": 0,

"dayStart": "8:00",

"dayEnd": "20:00"

},

{

"dayIndex": 1,

"dayStart": "8:00",

"dayEnd": "20:00"

},

...

{

"dayIndex": 6,

"dayStart": "-",

"dayEnd": "-"

},

],

"uploadedBy": "foo"

}

My current implementation with TypeScript looks like this:

const workbook = new [login to view URL]();

await [login to view URL]([login to view URL]);

const worksheet = [login to view URL]('Calendar Config');

const sheet: any[] = [];

[login to view URL]((row) => {

[login to view URL]([login to view URL]);

});

I am having problems to parse `Rows` and `Values` and putting them into the correct order for the JSON object and would highly appreciate some help here! :-)

Excel JavaScript Typescript

Projektin tunnus: #30470061

Tietoa projektista

6 ehdotusta Etäprojekti Aktiivinen 2 vuotta sitten

6 freelanceria on tarjonnut keskimäärin €4/tunti tähän työhön

AccountantArman

"Sir, I am Excel Advance Level Expert. This is a basic work for me. I can complete this project with in your desired time with added Quality. ""I have completed similar projects with five stars from client"". About Lisää

€2 EUR / tunti
(268 arvostelua)
7.3
nareshchahlia

I have 8 years of experience in data entry Specially in excel. My work is related to create excel sheet from multiple sheet to single sheet.

€5 EUR / tunti
(0 arvostelua)
0.0
azleyanasywa

Hi, I am ready to start now. I read your project description and understand that you need. I will start work immediately once we discuss the work. Looking forward to hear from you. Thank you.

€4 EUR / tunti
(0 arvostelua)
0.0