Home > Software engineering >  A serial port communication thread thread conflict with excel, speaking, reading and writing
A serial port communication thread thread conflict with excel, speaking, reading and writing

Time:09-20

Do a simple sensor data read in save small procedures, serial communication part, vs to create excel file, read and write files, save and close the file, but the problems and put the two together, always in the serial port to read data written to the automatically generated after the excel file save close excel file times wrong, would like to know how to deal with in this conflict should?

CodePudding user response:

It is recommended to use the most simple CSV text format

CodePudding user response:

Close the excel file times wrong what's wrong?

CodePudding user response:

The Debug, find wrong place first

CodePudding user response:

Thread conflict or what? Add the lock?

CodePudding user response:

Close the excel file times what wrong? Debugging and see

CodePudding user response:

Look at the read data, whether there is any special characters, or getlasterr see

CodePudding user response:

It seems no conflict, won't know until you look at the code, is Excel to close at the same time, also for other procedures

CodePudding user response: