advisr-io / excel4node

Node module to allow for easy Excel file creation
MIT License
128 stars 21 forks source link

formula for =Image() not working properly #85

Open nielsrobin opened 12 months ago

nielsrobin commented 12 months ago

When using the image formula on a cell. e.g.: =IMAGE("https://placekitten.com/200/300") =@IMAGE("https://placekitten.com/200/300","Kitten",0)

The image is not displayed in the cell after writing the excel to a file.

Instead the error "#NAME?" is displayed in the cell. However if you select the cell you see the full formula and if you hit enter to refresh the cell the image appears.

To reproduce:

var wb = new xl.Workbook()
var ws = wb.addWorksheet('Sheet 1')
ws.cell(1, 1).formula('=IMAGE("https://placekitten.com/200/300")')
wb.write('./file.xlsx', function(err, stats) {})

My expectation would be that the image is displayed in the cell without having to refresh the cell.

OS: Windows Node: v16.13.2 excel4node Version: 1.8.2 Application: Microsoft Excel