Skip to main content
Solved

Decimal datatype in excel writer

  • December 23, 2019
  • 3 replies
  • 55 views

Hi there,

 

I am writing data through excel writer. One of the attributes has got decimal numbers (such as 3.127). However, due to missing type of real32 data type, this attribute is treating as string. I tried to change it to the number but still it write as string. Any suggestions to overcome the issue.

P.S. I couldnt use csv writer as few attrbutes has datatype date which I couldnt assign in csv writer.

Best answer by danullen

I think the way to do it is to first create an Excel template that already has the correct format and then insert your data into it.

View original
Did this help you find an answer to your question?

3 replies

Forum|alt.badge.img
  • Best Answer
  • December 24, 2019

I think the way to do it is to first create an Excel template that already has the correct format and then insert your data into it.


danullen wrote:

I think the way to do it is to first create an Excel template that already has the correct format and then insert your data into it.

Thanks for the reply. I have already tried this approach but didn't work. The problem with this approach is that when I create the template with predefined datatype, excel writer start writing file from the next row (not from the row where I defined the data type of attributes). Any other suggestion please


Forum|alt.badge.img
  • December 27, 2019
muhammad_yasir wrote:

Thanks for the reply. I have already tried this approach but didn't work. The problem with this approach is that when I create the template with predefined datatype, excel writer start writing file from the next row (not from the row where I defined the data type of attributes). Any other suggestion please

I think the Excel writer puts the data into the existing rows, instead of inserting new ones. So if your first row contains the attribute names, you will need to change the format of all the following rows (which of course you do by clicking the top of the column to select all the cells in that column before right clicking to format the cells).


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings