Jump to content

number saved as text


Recommended Posts

Hey All,

Today's dilemma.....

I'm doing some data collection from a mass flow meter, saving values to a data table which I grab from the PLC using DataXport.

The values I'm saving to the data table are floating numbers (MF's), and when I look at the data table the values look fine.


But when I open the excel file created through DataXport, the floating numbers somehow get changed to "Number Stored as Text", and the guy who is analyzing the data isn't happy with this format....


I can do a conversion in my logic from the MF to an ML or an MI, and the guy will have to be happy with an implied decimal point to either 6 places or 3 places.

But I'm wondering if anyone knows the reason for the float to text phenomenon, or how to change the way the excel file saves it?



Link to comment
Share on other sites

  • MVP 2023

I do not know if this will help, but in some programs it is a warning that when exporting to the exel, you must remember the country in which you are.

In that case, excel use  system separaror that is a coma or dot.

It is selected in excel parameter. Please uncheck "use system separator" and use dot as excel internal separator. Then try to reopen  your file.


  • Like 1
Link to comment
Share on other sites

  • MVP 2023

Curious.  I'd be having a play with some of the Excel Options, particularly under Formulas and Error checking rules.  There are a number of possible suspects there which might be worth a try.  Particularly   "Numbers formatted as text.......".   

I'd be having a look at your raw output using something other than excel initially, on the chance excel is indeed changing things to suit what it sees as an error.

The other thing to have a look at might be to try things as a csv, and see if things improve by changing the separator in Dataexport properties.

IF it can't be solved with present setup, instead of changing your program, make him a small macro that converts it.  Not too hard.  (Edit:  Along the lines of record macro, select entire data area or bigger via drag or number input, format cells as whatever number format you want, stop macro recording.  So easy that perhaps not even a macro......depends on a few variables.)

cheers, Aus

Link to comment
Share on other sites

Thanks Guys.....

It was as simple as changing the site option from "create Excel file" to "create .csv file" and using the default comma separator.....

In all my other DataXport sites I've used the Excel file option and it always worked as expected, but this is my first time dealing with floating numbers...

Live and Learn   🤓


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...