« first day (2797 days earlier)      last day (33 days later) » 

9:41 AM
@andre314 Here is a simple proof of concept that works for me:
xlsxOpen[filePath_] := Module[{wb},
  wb = StartExternalSession[<|
     "System" -> "Python",
     "Version" -> "3",
     "Executable" -> "/usr/local/bin/python3"
     |>];
  ExternalEvaluate[wb, "import xlsxwriter"];
  ExternalEvaluate[
   wb,
   StringTemplate["workbook = xlsxwriter.Workbook(\"``\")"][filePath]
   ];
  ExternalEvaluate[wb, "worksheet = workbook.add_worksheet()"];
  wb
  ]
xlsxWrite[wb_, r_, c_, v_] := ExternalEvaluate[
  wb,
  StringTemplate["worksheet.write(``, ``, \"``\")"][r, c, v]
  ]
xlsxMerge[wb_, r1_, c1_, r2_, c2_, v_] := ExternalEvaluate[
  wb,
  StringTemplate["worksheet.merge_range(``, ``, ``, ``, \"``\")"][r1,
   c1, r2, c2, v]
  ]
xlsxClose[wb_] := Module[{},
  ExternalEvaluate[wb, "workbook.close()"];
  DeleteObject[wb];
  ]
Testing the code:
wb = xlsxOpen["path/to/test.xlsx"];
xlsxWrite[wb, 0, 0, "TopLeft"];
xlsxWrite[wb, 5, 5, 1234];
xlsxMerge[wb, 2, 2, 4, 5, "merged"];
xlsxClose[wb];
What it looks like in MacOS Preview:
 
9:58 AM
You need to install Python, of course, and install xlsxwriter. I recommend running StartExternalSession and ExternalEvaluate line by line, watching for warnings, if there is trouble.
 
10:28 AM
J.M.'s name is now "J.M. will be back soon" :)
6
 
 
10 hours later…
8:02 PM
@halirutan @C.E. Thanks. Today I have tried the Java approach. Yesterday I tried the python approach but I didn't succeed to execute "> pip.exe install pyzmq" described here. The message was of the kind "access to a file denied"
I think I will retry the python approach later.
Concerning the Java approach, I will continue as soon as possible (~in a few days, I hope)
 
8:25 PM
@andre314 ok, the Java approach will be fine too. JLink integrates better with Mathematica than ExternalEvaluate/Python anyway...
 

« first day (2797 days earlier)      last day (33 days later) »