Dataset export to Excel datetime conversion issue

Hello, I’m currently developing on Ignition version 8.0.9 and I am having issues exporting a chart dataset to excel by using both functions “system.dataset.exportExcel” and “system.dataset.toExcel”. The main problem is that the dataset has a column in Date format; Ignition exports such column transforming it in the following way:

01/02/2020 07:00:00 ===> 43862,2916666667

This causes the excel spreadsheet to require dedicated cell formatting to re-transform such value into a readable date. The same functions in version 7.9 didn’t cause this transformation.
How can I avoid this conversion from occurring?

Upgrade to 8.0.10. Date cells should natively export as Excel dates.

Is this error again happens in 8.0.15? I’m facing the same issue. It comes in unix milliseconds format.
Is there any way to convert to DD-MM-YYYY while we export to excel?

Sorry I couldnt get as required.

Table JSON is converted to dataset and I used system.dataset.formatDates as suggested. But no conversion. I still get in unix milliseconds timestamp.

data = self.parent.parent.getChild("TableConsumption")

# TableEXPORTFIELDCHOOSER is a custom made table for users to choose the columns and order of column to export.
tablefieldds = self.getSibling("TableEXPORTFIELDCHOOSER")
sorttablefieldds = system.dataset.sort(tablefieldds, 2)

#Get the chosen columns	
tablefieldheader = []
for row in range(sorttablefieldds.rowCount):
	if sorttablefieldds.getValueAt(row, "CHOOSE") == True:
		tablefieldheader.append(sorttablefieldds.getValueAt(row, "COLUMNS"))

tpc = self.parent.parent.getChild("TableConsumption").props.columns
newheader = []

#Get the field name for columns		
for title in range(len(tablefieldheader)):
	for row in range(len(tpc)):
		if tablefieldheader[title] == tpc[row]["header"]["title"] :
			tpcfield = tpc[row]["field"]

#convert JSON table output to dataset	
datasetData = []
for row in range(len(data)):	
	rowData = []
	for col in range(len(newheader)):
		cell = data[row][newheader[col]]
		if hasattr(cell, 'value'):

#export to excel	
finalDataset = system.dataset.toDataSet(tablefieldheader,datasetData)
formatdateds = system.dataset.formatDates(finalDataset, "dd-mm-yyyy")
XLSFormat = system.dataset.dataSetToExcel(True,[formatdateds], True)
timenow =, 'dd_MM_yyyy_HH_mm')
filename = 'T2_SHIFTPARAMS_' + timenow + '.xls',XLSFormat)

Here is a method that can export a list of Tables in excel. I did fix the formatting of the date using the column render method and dateFormat
This method only exports visible columns of Tables

exportToExcel(fileName, dataTable, sheetName):
	Generate an excel file containing the exact representation of the data shown in the table.
	fileName   : Name of the file without date and extension. Date is added automatically to the filename.
	dataTables : List of Table Object to export
	sheetNames : List of sheets names
def exportToExcel(fileName, dataTables, sheetNames):
	for dataTable in dataTables:
		data =
		tableColumns = dataTable.props.columns
		headers = []
		rows = []
		for r, row in enumerate(data):
			newRow = []
			for c, col in enumerate(tableColumns):
				if col["visible"]:
					if r==0:
					#format date
					if col["render"]=="date":
						dateValue =[col["field"]])
						dateFormat = col["dateFormat"]
						if dateFormat == "":
							dateFormat = 'yyyy-MM-dd HH:mm:ss'
		ds = system.dataset.toDataSet(headers, rows)
	xlsxBinary = system.dataset.toExcel(True, xlsxData, True, sheetNames)
	filename = '%s_%s.xlsx' % (fileName,, xlsxBinary)
1 Like