You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
encode_for_xl(x::Any) = throw("Cannot encode variable of type $(typeof(x))")
with
encode_for_xl(x::Any) = "$x"
As it is, if there is one cell in a table that isn't one of the 17 or so supported types (lines 277-296), the whole table fails.
With this change - the table will be written. Any cells not of the 17 supported types will use Julia's default string display.
For example, I have code to convert a Struct to tables with 2 columns (Field Name, Field Value) but some of the Struct fields are enum types. This isn't a supported type so causes the table to fail in Excel. With the above change the enum is printed as a string.
The text was updated successfully, but these errors were encountered:
Hi
I think the way for you to handle this is to import the function JuliaExcel.encode_for_xl and add a method to handle your enumeration. Here's an illustration:
would you consider replacing
with
As it is, if there is one cell in a table that isn't one of the 17 or so supported types (lines 277-296), the whole table fails.
With this change - the table will be written. Any cells not of the 17 supported types will use Julia's default string display.
For example, I have code to convert a Struct to tables with 2 columns (Field Name, Field Value) but some of the Struct fields are
enum
types. This isn't a supported type so causes the table to fail in Excel. With the above change the enum is printed as a string.The text was updated successfully, but these errors were encountered: