Exporting to Excel

Hello,

Maybe this can help. We were working a few days with this and it’s more related with Microsoft especification than Ignition.

If you use the ignition function to export to excel (system.db…Excel) and use the xls extention, excel will raise a message argueing problems with the extension.

You can solve this saving with XML extention. But in windows, excel doesn’t know that this xml file is an excel file. To solve this we add the following tag in the beggining of the file:

<?mso-application progid="Excel.Sheet"?>

If like me, you use spanish in you sheets, maybe you want to add this too:

<?xml version="1.0" **encoding="ISO-8859-1"**?>

In my case, I have to write the file using the typical “file write” python command, but It’s extensible to another aproach.

Greetings,

Hey, I just wanted to mention here that you can use xlsxwriter from python and it is completely free. Just putting this here, but this post popped up first when searching for how to write to excel in ignition.