How to make the libreoffice interpret the signal from - sent by program in python?

1
Hello, I'm trying to use worksheet.write_formula(row,col+5,'=B%d-E1'%(row+1)) to write a formula in CALC, but the minus sign seems to be being interpreted incorrectly in Libreoffice and I need to manually change the signal. Would you know how to solve this problem?

The complete code is this:

from pyexcel_ods import save_data 
import time, sys
import xlsxwriter
import serial

receivedSF = serial.Serial('/dev/ttyUSB0', 9600)
row = 0
col = 0
count = input("Numero de dados a ser coletados: ")

workbook = xlsxwriter.Workbook('hello.xlsx')
worksheet = workbook.add_worksheet()

worksheet.write(0,3,"TEMPO DE REFERENCIA:")
worksheet.write(0,4,time.time())
for item in range(count):
   valor = int(receivedSF.read(2))
   print row, valor
   worksheet.write(row,col, valor)
   worksheet.write(row,col+1,time.time())
   worksheet.write_formula(row,col+5,'=B%d-E1'%(row+1))
   row+=1
workbook.close()
receivedSF.close()
    
asked by anonymous 22.07.2017 / 21:01

0 answers