Could you please assist me in understanding how to utilize the jexcel plugin for pushing arrays?
To achieve the push functionality, I would like it to behave similarly to arrays containing 6 different colors as outlined below:
Subtitles = orange,
Captions = yellow,
Chapters = blue,
Description = lime,
Interaction purple,
Metadata = pink
var data = [
["Subtitles"],
["Captions"],
["Chapters"],
["Description"],
["Interaction"],
["Metadata"],
];
jexcel(document.getElementById('spreadsheet'), {
data:data,
columns: [
{
type: 'hidden',
},
{
title: 'Subtitles',
},
{
title: 'Captions',
},
{
title: 'Chapters',
},
{
title: 'Description',
},
{
title: 'Interaction',
},
{
title: 'Metadata',
},
],
});
I attempted to implement the following code, but encountered issues with its functionality:
titlesArray = ["Subtitles", "Captions", "Chapters", "Description", "Interaction", "Metadata"];
var colors = ["orange", "yellow", "blue", "lime", "purple", "pink"];
for(var index = 0; index < titlesArray.length; index++) {
var newArray = titlesArray.push("Subtitles", "Captions", "Chapters", "Description",
"Interaction", "Metadata");
}
$('p').css('color', function(index) {
return colors[index % colors.length];
});
The screenshot demonstrates the visual representation of colors for particular titles, which should be consistent for all 6 subtitles without alteration.
Specifically, I require the title "French" to appear in blue and "English" in Orange, along with custom font sizes, displayed as headings on the top of the last two boxes depicted in the initial row in the provided screenshot.