Specifying data type when replacing tables using IronPython (from Excel)

Hi,

 

I am currently running a script which will replace data tables with excel sheets through a simple file explorer interface. The script is based on a script provided to me in a previous question (https://community.tibco.com/questions/replacing-data-table-excel-workshe...). However I am noticing that spotfire is automatically guessing the data type of a column based on the first n rows of data imported. This works well in most cases, however I recently discovered that If I am importing a column which only contains whole numbers and one (or more) of these numbers is greater than 2147483647 (the integer limit), Spotfire will not read in this number as it has already specified the column type as integer.

 

Is there a way I can specify the data type of columns when replacing data using the Document.Data.CreateFileDataSource(filename) method? I know it is possible to set column data type settings when importing a text file using the TextDataReaderSettings(), but I am unable to find such a method to help with specifying data types when importing from excel.

 

Any information be greatly appreciated, thanks!

 

(Note: I am currently running Spotfire 7.6)

(1) Answer

Login