Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.

Categories

import of numbers with decimal comma

0 votes
When importing my Excel file, the column containing IDs is interpreted with a decimal comma (followed by one 0), which for a fact is non existant in my file. I need my IDs, for example "4569" to be read as such and not as "4569.0".

I have already tried changing the number formatting in my Excel (general, number, text, custom) and nothing seems to make a difference.

Thanks in advance for your help!
 

Carolina
in Help by (210 points)

Please upload a small sample spreadsheet that lets us reproduce the problem. Please see How to upload files to yEd Q&A? for instructions on how to upload files here.

I don't see where to upload anything nor the instructions you mention :(
The "How to upload files to yEd Q&A?" part of the last sentence in my previous comment is a hyperlink. (That is the reason it is displayed as blue text instead of black text.) If you click with your left mouse button on that hyperlink, your browser will open a post that explains - well - how to upload files here.
haha, I am really sorry for that.. I did not see that there was that hyperlink... For some reason I expected it to be in the word "here", haha,  I must be too tired already. I´ll upload the sample right away
your web page is crushing constantly when I try to upload the file (it does not offer the button to "browse" and the button to cancel does not respond)... I´ll try later again

2 Answers

0 votes

Please find here the sample Excel table.

by (210 points)
0 votes
Thank you very much for uploading a sample spreadsheet.

After some research, it turns out that the library used for reading spreadsheets does not differentiate between cells formatted for integral numbers and cells formatted for decimal numbers (to be honest I do not know if it is even possible in Excel to restrict cells to integral numbers only). Long story short, data from cells formatted for numbers is always imported as decimal numbers.
The only workaround I can think of is temporarily changing the cell formatting to "Text" right before importing the spreadsheet into yEd and reverting the cell formatting once again afterwards. (Of course, your IDs will then be text in yEd as well.)
by [yWorks] (160k points)
I just found this entry and I have exactly the same problem, I want to import data from Excel to yED and my IDs are "integer" values like 1 / 2 / 3 / .... When I import, the values are changed from "x" to "x.0". The same happens when I change the cell formatting in Excel to "text", this was also my first try before reading the answer from thomas.behr. So for me the recommended workaround is not working.

Did anybody find a workaround for this problem in the meantime?

Thank you in advance!
Tobias


Update some minutes later:
I saw right now that there were several discussions about this topic and it seems to me, that it's not possible to change this behaviour during Excel import, but it's easily possible to change the data type to "integer" in the custom properties.
This is working for me and I can live with that one additional step.
Hi all, I came across to this problem yesterday. After many tries, I found the solution: in excel just add before a single quote as tough you want to convert numbers to text. For example, '6 instead of 6. It worked for me! :)
Legal Disclosure | Privacy Policy
...