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

Can someone help on excel import?

0 votes

I'm trying to import an excel file with just nodes at the moment, with a lot of custom attributes. A shortened example:

id email superuser key_type description organisation ttl
886 my.mail@ddr.es false read Testkey für Stephan Hradek memyself 1513318963
887 my.mail@ddr.es false read Stephan Test 1   1544882709
888 my.mail@ddr.es false read Stephan Test 3   1545122505
889 my.mail@ddr.es false read shk   1545312219
890 my.mail@ddr.es false read shk   1545312807
891 my.mail@ddr.es true write test Hradek 2   1545312966
892 my.mail@ddr.es false read botfrei-cheater   1547197043

 

The custom properties should be "Integer" for "id" and "ttl" and "binary" for "superuser".

Integer is not recognized. It gets imported as "Decimal". Also binary is not regognized but imported as "Text"

My property mapping is

Data Source Map To Conversion
id Label Text Automatic
key_type Fill Color Distinct Values
superuser Fill Color Distinct Values

Just the key_type mapping works.

id is not shown unless I switch the Custom Properties to "Integer" and reapply. Same for superuser. I have to manually switch it to binary and reapply the mapping.

Is there any way I can define a (kind of) import schema for excel files?

Additionally I'm wondering whether or not it is possible to group my nodes by a property (email here) and have the property value become the group's label.

in Help by (140 points)
Can you please change the title to "Importing Excel file - How to import integer columns"? That will help other users to look up this discussion in future.

Thanks!

1 Answer

+1 vote

yEd's Excel import cannot create custom properties of type "Integer" - all numerical data will always be imported as "Decimal". The reason for this is simply the fact that the library we use does not differentiate between integral numerical data and decimal numerical data.

Custom properties of type "Boolean", however, are supported. (Please see this very simple spreadsheet for a proof-of-concept.) If it does not work for your spreadsheet, the data in column "superuser" might not be formatted as "BOOLEAN" in your spreadsheet.

Finally, it is indeed possible to group nodes by a property. Simply set the "Column of Group Node IDs" to the appropriate column of your spreadsheet. If your spreadsheet has a row whose node ID matches one of the group IDs, the data in said row is imported as custom properties for the corresponding group. Thus the simpest way to specify labels for group nodes is to create a dedicated column for labels and specify the corresponding property name as "Label Text" on tab "Presentation". If you want your group IDs as label text for your group nodes, duplicate the data from the column used as group ID in column used for label text.

by [yWorks] (160k points)
Thanks for the reply.

It's a pity that integers cannot automatically be recognized :( So my current best option is to create the ids as text. I simply do not like that each label gets a ".0" appended. I couldn't find any way to format decimals in the Properties Mapper.

Your explanation about labeling groups are unclear to me.

With my above example I choose column B as the column containing the group IDs. What I got was one group with ID 0.0

Now I've added a tab "Presentation" containing

Group_ID    Group_Label
my.mail@ddr.es    my.mail@ddr.es

and choose "Presentation!A" as the column for group id

What I got was:

a) Each node now was a group correctly labeled
b) One additional node for the Presentation tab's content

That's clearly not what I intended ;)

__________________________________________
UPDATE: I changed my application now to write out all data formatted as text.

I do not know why, but all of a sudden the groups are properly labeled.

So issue solved.

Thanks!

I did not mean to suggest adding a new "tab" (or page) in your spreadsheet. With '... and specify the corresponding property name as "Label Text" on tab "Presentation" ...' I meant the "Presentation" tab in the Excel Import settings dialog.

Legal Disclosure | Privacy Policy
...