Click here to Skip to main content
15,886,055 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionJavascript to create Multilingual Footer Pin
Member 148850579-Jul-20 1:09
Member 148850579-Jul-20 1:09 
AnswerRe: Javascript to create Multilingual Footer Pin
ZurdoDev9-Jul-20 10:16
professionalZurdoDev9-Jul-20 10:16 
QuestionAny tips? I am brand new and created a binary translator. I'm open to feedback. Pin
Hany Halim1-Jul-20 9:55
Hany Halim1-Jul-20 9:55 
QuestionRe: Any tips? I am brand new and created a binary translator. I'm open to feedback. Pin
Richard MacCutchan1-Jul-20 22:41
mveRichard MacCutchan1-Jul-20 22:41 
AnswerRe: Any tips? I am brand new and created a binary translator. I'm open to feedback. Pin
ZurdoDev9-Jul-20 10:17
professionalZurdoDev9-Jul-20 10:17 
AnswerRe: Any tips? I am brand new and created a binary translator. I'm open to feedback. Pin
Richard Deeming1-Jul-20 23:45
mveRichard Deeming1-Jul-20 23:45 
AnswerRe: Any tips? I am brand new and created a binary translator. I'm open to feedback. Pin
Member 1489456920-Jul-20 15:46
Member 1489456920-Jul-20 15:46 
QuestionCannot read back correct JSON from excel workbook Pin
kjeeva28-Jun-20 10:57
kjeeva28-Jun-20 10:57 
I am using npm module xlsx to write and read JSON data.

I want to write this JSON to excel
{ "name": "John", "class": 1, "address" : [ { "street": "12th Cross" , "city": "London" }, { "street": "22nd Cross" , "city": "Cade" } ] }

Later when I read back I want to get same JSON from excel file

If you already solved, any suggestion or help will be of great help Smile | :)

Here is what I have tried

```
var XLSX = require("xlsx");
console.log("Node Version: " + process.versions.node);
console.log("XLSX Version: " + XLSX.version);

/* GENERATE TEST FILE */
(function() {
// create workbook
var wb = XLSX.utils.book_new();
var ws = XLSX.utils.json_to_sheet([
{ "name": "John", "class": 1, "address" : [ { "street": "12th Cross" , "city": "London" }, { "street": "22nd Cross" , "city": "Cade" } ] }
], {header:["name","class","address","street","city"]});

XLSX.utils.book_append_sheet(wb, ws, "Sheet1");
XLSX.writeFile(wb, "testfile.xlsx");
let worksheet = wb.Sheets['Sheet1'];
let jsonArray= XLSX.utils.sheet_to_json(worksheet);
console.log(JSON.stringify(jsonArray));
})();
```
This returns
```
Node Version: 8.12.0
XLSX Version: 0.16.2
[{"name":"John","class":1}]

But I was expecting
{ "name": "John", "class": 1, "address" : [ { "street": "12th Cross" , "city": "London" }, { "street": "22nd Cross" , "city": "Cade" } ] }
```

Any help or suggestion will be of great help Smile | :)
QuestionI am creating a program with Visual Basic Script files with C++. Pin
c0d3r1/226-Jun-20 7:15
c0d3r1/226-Jun-20 7:15 
AnswerRe: I am creating a program with Visual Basic Script files with C++. Pin
Bohdan Stupak29-Jun-20 4:18
professionalBohdan Stupak29-Jun-20 4:18 
AnswerRe: I am creating a program with Visual Basic Script files with C++. Pin
ZurdoDev29-Jun-20 4:35
professionalZurdoDev29-Jun-20 4:35 
Questionhow to get audio play auto work in mobile browsers andriod & ios Pin
Member 1486961821-Jun-20 20:38
Member 1486961821-Jun-20 20:38 
QuestionNeed javascript code support for below request Pin
mikt201618-Jun-20 0:57
mikt201618-Jun-20 0:57 
AnswerRe: Need javascript code support for below request Pin
ZurdoDev18-Jun-20 2:00
professionalZurdoDev18-Jun-20 2:00 
AnswerRe: Need javascript code support for below request Pin
Richard MacCutchan18-Jun-20 4:43
mveRichard MacCutchan18-Jun-20 4:43 
QuestionAccordion not working properly with dynamic content Pin
mhutch2617-Jun-20 4:09
mhutch2617-Jun-20 4:09 
QuestionData from one page to another with a twist. Pin
and180y14-Jun-20 10:33
and180y14-Jun-20 10:33 
AnswerRe: Data from one page to another with a twist. Pin
Richard Deeming15-Jun-20 0:41
mveRichard Deeming15-Jun-20 0:41 
GeneralRe: Data from one page to another with a twist. Pin
and180y15-Jun-20 1:00
and180y15-Jun-20 1:00 
GeneralRe: Data from one page to another with a twist. Pin
Richard Deeming15-Jun-20 1:15
mveRichard Deeming15-Jun-20 1:15 
GeneralRe: Data from one page to another with a twist. Pin
and180y15-Jun-20 1:24
and180y15-Jun-20 1:24 
GeneralRe: Data from one page to another with a twist. Pin
Richard Deeming15-Jun-20 1:27
mveRichard Deeming15-Jun-20 1:27 
GeneralRe: Data from one page to another with a twist. Pin
and180y15-Jun-20 1:46
and180y15-Jun-20 1:46 
GeneralRe: Data from one page to another with a twist. Pin
Richard Deeming15-Jun-20 4:59
mveRichard Deeming15-Jun-20 4:59 
GeneralRe: Data from one page to another with a twist. Pin
and180y15-Jun-20 8:56
and180y15-Jun-20 8:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.