SERIAL output lossy?

Hi, I’m trying to build a data logger (Windows app) that reads serial output from a micro:bit via COM port and pipes it directly into Excel. The app works, but the data arriving from the micro:bit appears lossy. Is this something I am doing wrong?

This is the raw data I am receiving from the micro:bit, but there should be 3 values every time:

RAW: b’1532.37,\r\n’ --1 value

RAW: b’1535.86,1,1\r\n’ – correct 3 values

RAW: b’1539.241,1\r\n’ --2 values (3 but the comma is missing)

RAW: b’1540.931,1\r\n’ --2 values (3 but the comma is missing)

input.onButtonPressed(Button.A, function () {
datalogger.log(
datalogger.createCV(“CardType”, 1),
datalogger.createCV(“Stock”, 1)
)
stock += 1
basic.showNumber(stock)
})

input.onButtonPressed(Button.B, function () {
datalogger.deleteLog()
stock = 0
basic.showIcon(IconNames.Yes)
})

let stock = 0
serial.setTxBufferSize(128)
serial.redirectToUSB()
datalogger.setColumnTitles(“CardType”, “Stock”)
datalogger.includeTimestamp(FlashLogTimeStampFormat.Seconds)
datalogger.mirrorToSerial(true)
basic.showNumber(stock)