I wrote a python script that uses the CSV and xlrd packages to convert a .xlsx binary excel file to a tab delimited .txt file. Unfortunately, every cell is converted to a string (which is understandable), and every integer is converted to a float represented as a string. For example:
A cell in excel has the integer 5.
This will be output from my script as "5.0".
Given downstream processes, it is essential to maintain type consistency between the original excel file and the converted .txt file. It is quite challenging to decipher data types after the conversion, because it can be impossible to tell weather a number was originally a integer or a float without looking at the original file.
My ultimate question is the following:
Does excel save all numeric values as floats automatically?
If so, is there a way to adjust the settings to allow for integers?
Thank you.