Format cell while writing

Hello guys, I have a table from a database where I want to write it into an excel file. There’s a decimal data type in the table so I want it to write as 123,142.00 formats. Right now it only shows integers without the comma. As the title said, I want to find a way that can make me format the cell into the format I want after writing it to a cell.

I found other packages but most of it requires an already made excel file. Anyone has an idea for this?