is it even possible to format a csv with some minor formatting?
I have at table with some Boolean values that I would like to show as a checkbox. As well as date formatting.
is it even possible to format a csv with some minor formatting?
I have at table with some Boolean values that I would like to show as a checkbox. As well as date formatting.
CSV is just a text format, so no, you can't force a checkbox to appear. That would be a rendering choice of whatever software you opened in the CSV file in.
Dates are also just text. You can re-format the date however you like by modifying the dataset you export.
If you want to do such things, you really need to use a format-capable file type, like Excel. The Apache POI libraries that come with Ignition make nearly anything possible. (Lots of examples here on the forum.)
Actually I guess you could stuff emojis into the text file
☑️, ✅, 🌴
(don't do this)
Ewww!
I thought emojis were just for use in passwords.
I think I never saw .csv with formatting...
Try to csv2xlsx, It's always worked for me
yea going to do excel, just easier. The question remains. Does anyone know a way to format a checkbox in the export?
trying to build this
but it looks like this
Write a script to read a sample Excel file (with Apache POI) that has checkboxes formatted as you desired. Programmatically examine the details of those cells. Write your Apache POI exporter to construct those cells the same way.
CSV doesn't support formatting.
If you are referring to GitHub - ferkulat/csv2xls: csv2xls (csv to xls) is a command line utility which converts csv files into one (or more if maximum rows are exceeded) Excel(TM) file(s)., the project page explicitly states,
Limitations
- produces only Excel(TM) 97/2000/XP/2003 files
- no cell formatting, just plain text
This won't convert a boolean true / false to a checkbox, one of the OP's requirements.
Did you mean something else?
yea sorry, not doing a csv, its gonna be an xlsx.