step 1:first test line 1, I can see the output console is a pydataset
here is the code:
results = system.db.runQuery(“SELECT * FROM [MaluProduction].[dbo].[CoreType]”)
results = system.dataset.toDataSet(results)
spreadsheet = system.dataset.toExcel(1, [results])
filePath = “C:\temp\TTT.xls”
system.file.writeFile(filePath, spreadsheet)
I use the manual code, in the path, temp this is a TTT document come out, but when I open the document , it will report fault and see the upside picture, this bug not have in 7.9.10.
I haven’t done anything like before, keep me online.
Here an advice. When I used to write data to excel file from LabView or Matlab, I always used .xlsx with no problems. Try exporting in that extension instead of .xls
Tim
March 6, 2020, 3:07pm
3
I have had the same issue in 8.0.7 and 8.0.9. I've had to fall back to exporting to csv for now.
I think this may be a related post:
Hey all,
I just updated my Ignition servers to 8.0.8 from 7.9.12 and now I’m having a problem with the system.dataset.exportExcel() function. I get the following error:
Traceback (most recent call last):
File "<event:actionPerformed>", line 2, in <module>
File "<module:shared.genFunctions>", line 10, in dataExport
at org.apache.poi.xssf.usermodel.XSSFWorkbook.validateSheetName(XSSFWorkbook.java:906)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.createSheet(XSSFWorkbook.java:859)
at com.…
1 Like
This issue is fixed in 8.0.10
i see the current version is 8.0.9 when the new version can be download ?
i have test in 8.0.10RC1, Successed, thanks
Kevin.Herron mentioned in 8.0.10 , i have tried , success, you can also update your gateway