Here is my code that writes to the sheet.
const handleClick = () => {
    var wb = XLSX.utils.book_new();
    var ws = XLSX.utils.json_to_sheet(arrayofobjects);
    XLSX.utils.book_append_sheet(wb, ws, 'Test');
    XLSX.writeFile(wb, 'file.xlsx');
};
let arrayofobjects = [
    {
        "00": 4,
        "01": 6,
        "10": 12,
        "11": 7,
    },
    {
        "00": 7,
        "01": 7,
        "10": 4,
        "11": 5,
    }
]
But I am getting output in another order in excel
This is what I am expecting


 
    