Python code to windows10

snippit of python code thats calcs  Sums & Av  works on pi   arch64   but not to windows 10 
def get_header():
    #open CSV file and assign header
    headerList = ['Time', '=ROUND(AVERAGE(B4:B1400),1)', '=ROUND(SUM(C4:C1400),1)', \
              '=ROUND(AVERAGE(D4:d479),1)',"=ROUND(AVERAGE(E4:E479),1)","..xx..","=ROUND(AVERAGE(G4:G479),1)",\
              '=ROUND(AVERAGE(H481:H958),1)',"=ROUND(AVERAGE(I481:I958),1)","..xx..","=ROUND(AVERAGE(K481:K958),1)",\
              '=ROUND(AVERAGE(L961:L1435),1)',"=ROUND(AVERAGE(M961:M1435),1)","..xx..","=ROUND(AVERAGE(O961:O1435),1)",\
              '=ROUND(AVERAGE(P480:P960),1)'," Ph1 ","=ROUND(AVERAGE(R480:R960),1)"," Ph3 ","Ext"]
    with open ("/home/pi/Logs_"+month_now+"/Batt"+day_now+".csv","a",newline="") as csvfile :
    #with open("/home/pi/Desktop/SolarData_Feb/Batt_Amp_02.csv", 'a') as file:
        dw = csv.DictWriter(csvfile, delimiter=',',fieldnames=headerList)
        dw.writeheader()
        time.sleep(1)

Which Windows path would you expect to see instead /home/pi/Desktop/SolarData_Feb/Batt_Amp_02.csv ?
Maybe this one?

my poor explaination paths to win10 working
there no formula happening

|23,56,02|24.9|125|||
|23,57,02|24.9|125|||
|Time|=AVERAGE(B4:B1434)|=SUM(C4:C1435)|=AVERAGE(D4:d479)|=AVERAGE(E4:E479)|

Maybe somthing like:

from pathlib import Path
from datetime import datetime as dt
from time import sleep
import csv

def get_header():
    now = dt.now()
    FILEPATH = Path.home() / f"Logs_{now.month}_Batt_{now.day}.csv" 
    #open CSV file and assign header
    headerList = ['Time', '=ROUND(AVERAGE(B4:B1400),1)',
                  '=ROUND(SUM(C4:C1400),1)', '=ROUND(AVERAGE(D4:d479),1)',
                  "=ROUND(AVERAGE(E4:E479),1)","..xx..",
                  "=ROUND(AVERAGE(G4:G479),1)", '=ROUND(AVERAGE(H481:H958),1)',
                  "=ROUND(AVERAGE(I481:I958),1)","..xx..",
                  "=ROUND(AVERAGE(K481:K958),1)", '=ROUND(AVERAGE(L961:L1435),1)',
                  "=ROUND(AVERAGE(M961:M1435),1)","..xx..",
                  "=ROUND(AVERAGE(O961:O1435),1)", '=ROUND(AVERAGE(P480:P960),1)',
                  " Ph1 ","=ROUND(AVERAGE(R480:R960),1)"," Ph3 ","Ext"]
    with open (f"{FILEPATH}","a",newline="") as csvfile :
    #with open("/home/pi/Desktop/SolarData_Feb/Batt_Amp_02.csv", 'a') as file:
        dw = csv.DictWriter(csvfile, delimiter=',',fieldnames=headerList)
        dw.writeheader()
        sleep(1)

thanks all for looking
removed 7.4.7.2 and back to download the 7.0.4.2
query all updates ???

It seems that the whole question is worded in such a confusing way, that it actually has nothing to do with the real problem the user is facing. It talks about some programmatic way to generate a CSV; and it tells that that code (unrelated to LibreOffice!) doesn’t work on Windows…The following comment sheds some light on the actual problem:

So, the problem in unknown version of LibreOffice (until the third message told “removed 7.4.7.2 and back to download the 7.0.4.2”) is that the CSV doesn’t import formulas. And then, @user21 asks: “query all updates ???”

Sort of. E.g., looking with attention to the current CSV import dialog reveals this:

Also, it could help to read release notes, when upgrading. Indeed, the release notes to version 7.3 told this:

  • A new Evaluate formulas option in the CSV Import and Paste Special and Text to Column dialog determines whether formula expressions starting with a = equal sign character are to be evaluated as formulas or imported as textual data. In the programmatic FilterOptions string this is the 13th parameter (token 12) with arguments either false or true. tdf#114878 (Eike Rathke, Red Hat)