rustxlsxwriterxlsrust-polarsrust-xlsxwriter

Rust write struct to the xls


I found rust_xlsxwriter to write some information into xls file. I need to write some struct (more than 10 fields in) into xls file. When I used python I could transform object into pandas Dataframe and write Dataframe into xls file, just in 2 lines. Maybe exists a way to do it in Rust without manually transform struct into vector of Strings.

I tried Polars, but I can't transform struct into dataframe, maybe this is my problem?


Solution

  • Without more context it is hard to say which is the best approach but you could use Serde serialization with the struct: Working with Serde and rust_xlsxwriter.