We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How to put data into excel cell with my own Excel template ?

I have these data and I want to put them into excel cell that I have by using "fetch" to open my excel but when I look at the cell range document. I don't see how to add the data into cell.

Example :

  1. Brand: Asus put into C14 (cell range).

  2. CPU: Intel core i9 put into D18 (cell range).

  3. RAM: 128GB put into D19 (cell range)



openExcel() {
fetch("assets/excel/prompt.xlsx") // fetch the remote url
.then((response) => {
response.blob().then((fileBlob) => { // convert the excel file to blob
let file = new File([fileBlob], "Sample.xlsx"); //convert the blob into file
this.spreadsheetObj.open({ file: file }); // open the file into Spreadsheet
})
})
}


this is my excel template.


Template excel.png


This code is for " Get data from database "


getAllElectronics() {
this.dataApi.getAllElectronics().subscribe(res => {
this.electronicObj = res.map((e: any) => {
const data = e.payload.doc.data();
data.id = e.payload.doc.id;
console.log(data);
})
})
}


you can see there are objects in the console.


object.png


Regards
Flame










1 Reply

SP Sangeetha Priya Murugan Syncfusion Team November 21, 2022 10:34 AM UTC

Hi Siripaiboon,


Before we proceed further, please share the below details.

 

1. A detailed description of your requirements, accompanied by a video demonstration

2. The dummy Excel file template

3. If possible, share a replicable sample of the issue.

4. Confirm whether you need to add the data after importing the Excel file into the spreadsheet.

5. Essential Studio Product Version

 

Could you please check this and get back to us with the above requested information? Based on that, we will check and provide you with a better solution.

 

Regards,

Sangeetha M


Loader.
Live Chat Icon For mobile
Up arrow icon