Fork me on GitHub
#data-science
<
2021-10-06
>
Daniel Slutsky09:10:03

This weekend we will have study sessions about data visualization and data modeling. Details at Zulip: https://clojurians.zulipchat.com/#narrow/stream/264992-ml-study/topic/planning.20ml-study.2023

sb14:10:55

I have a new question, at [libpython-clj 2.000] what is equivalent with py/from-import ? I see in the documentation for old version: (from-import numpy linspace) but I get No such var: py/from-import (py is my alias in ns)?

sb14:10:37

Sorry, I saw now here is a libpython-clj channel. I dropped there too.

jsa-aerial15:10:24

you will have more response at https://clojurians.zulipchat.com/#narrow/stream/215609-libpython-clj-dev - that is where developers and users hang out.

sb15:10:26

ok, thanks!

sb20:10:53

If somebody needed in the future: xlsx/xlsm writing without style/ vba macro loss https://gist.github.com/damesek/e97a5fd28c87bf590e18a307f2d21b0f

🙏 1
chrisn13:10:15

did fxl result in losing macros?

sb18:10:50

Yes, all case Openpyxl, pandas, org.apache.poi, docjure, fxl.. etc.. you can’t write xlsm the file at the end or lost original style, or else problem. The goal was.. without any modification/ side effect modify or write to different place the original template spreadsheet.

sb18:10:28

FXL very cool if you work from a blank state, I really like!

sb18:10:01

I tested now again: I get this:

sb18:10:09

fxl.core=> (fxl/write-xlsx! test-xls "test.xlsm") {:workbook #object[org.apache.poi.xssf.usermodel.XSSFWorkbook 0x33e7fc01 "Name: /xl/workbook.xml - Content Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"], :output-stream #object[java.io.FileOutputStream 0x10491fe4 ".FileOutputStream@10491fe4"]}

sb18:10:36

Successfully wrote the xlsm file, but you can’t open anymore. You get error.

sb18:10:03

(test-xls is data from xlsm file with read-xlsx!)

sb18:10:05

Btw, that is a really cool lib as I wrote. I really like the clojure approach.

chrisn13:10:13

Thanks for giving everything a shot! The goal makes sense and I can see it would be really useful for a lot of scenarios especially in automating business flows - it is disappointing that the underlying libraries don't correctly deal with all the various forms of data that are in spreadsheets.

👍 1
sb19:10:22

I checked now, editpyxl use https://lxml.de/ lib, which is similar like tagsoup in clojure (?). No extra dependencies as I see ‘lxml (>=4.1.1)’. If that is helpful.

sb19:10:54

(Maybe I test with ’tagsoup the same logic.. works or not [with Clojure] on the next week.)