Calc number format automation

I’ m trying, to use Calc along with Python’s library pyoo to automate a calculation I have in a .ods spreadsheet using as input some data I have in a csv.

So far, I have been able to correctly load all the data in the .csv to my .ods file the way I need it but it seems like I’ m having trouble formatting the input numbers so they are recognized by my .ods as such . They seem to be recognized as strings. I have unsuccessfully tried to manually set them as numbers, by right-clicking in the cells I want to format, then selecting quantity in category and -1234.12 in format. Anyway, I’ m looking for a solution automated.

Moreover my decimal separator character is european (comma), and I think that adds to the trouble of working with .csv since I can’ t import the .csv numbers (most of them are decimal) using the european format. I have tried to set my decimal character to american (dot) in Tools->Options->Language Settings->Languages and it changes the decimal character indeed; but the formulas keep on not recognizing decimals unless I use a comma as separator.

I’ m looking for a way to programatically import, my decimal .csv data into my .ods spreadsheet and let my decimals be recognized as such so my formulas can evaluate . Thank you in advance.

I ended up solving it directly in Python. I got each value I needed, in a list so I could convert it to the correct format, and then loaded, that data in my .ods to complete the calculation. I leave this question unsolved in case anybody has a working libreoffice answer.

Thank you. Best regards,