Affichage des résultats 1 à 4 sur 4

Discussion: Variable columns in Excel

  1.    #1
    Moderator Avatar de DaveP
    Date d'inscription
    janvier 2011
    Localisation
    St Paul, MN
    Messages
    3 525
    Heure locale
    09h35

    Not allowed! Not allowed!

    Variable columns in Excel

    I'm working on a graph that will read an Excel file and create Family Types.
    I've got everything working (I'll share if you want it) but the problem I'm having is every time we get a spreadsheet from a new client, everything is in different columns.
    So what I'd like to be able to do is either read the column headers and have Dynamo figure out what that column is, or maybe have a second Tab in the spreadsheet that would call out
    Column F Width
    Column G Depth
    Column H Height
    Column Q Type Name
    And then somehow have Dynamo translate that into which column to use to pass that parameter
    But I can't think of a good way to do that without a thousand wires flying all over.
    Cliquez sur l'image pour la voir en taille réelle

Nom : Equipment Graph.PNG
Affichages : 7
Taille : 88,5 Ko
ID : 40300
    Maybe somehow create a dictionary?

  2.    #2
    Forum Addict Avatar de elton williams
    Date d'inscription
    décembre 2010
    Localisation
    Gold Coast
    Messages
    2 881
    Heure locale
    00h35

    Not allowed! Not allowed!
    Couldnt you just provide the client with a template excel file?
    What you want would negate some of the human error though, and im sure its possible but its a bit beyond my dynamo skills atm

  3.    #3
    Member
    Date d'inscription
    décembre 2010
    Localisation
    Astana
    Messages
    313
    Heure locale
    20h35

    Not allowed! Not allowed!
    Suppose that the names of the columns are different each time, then manually opening the spreadsheet and determining the required columns cannot be avoided. I would add 4 input number nodes to the script to override the column indices retrieved from the Excel file, if required.

  4.    #4
    Member Avatar de Bjorn_K
    Date d'inscription
    avril 2011
    Localisation
    Rotterdam, Netherlands
    Messages
    454
    Heure locale
    16h35

    Not allowed! Not allowed!
    Assuming at least the names are something you know this should work:

    Cliquez sur l'image pour la voir en taille réelle

Nom : multiple_header_search.png
Affichages : 3
Taille : 1,14 Mo
ID : 40307

    Might want to make a little interface where people can enter the Column names if they differ. I would not play with the order there, knowing which property is in which position after you rejigged it will let you do all the other things you want.

    If the names of the columns are something you can rely on, you can just use this to fire&forget in all cases.

    I used this last year without any trouble at all while dealing with a customer whose data-archive was such a mess I'm reluctant to call it an archive.

Discussions similaires

  1. Variable Floor Help
    Par Kyle Roseman dans le forum Architecture and General Revit Questions
    Réponses: 13
    Dernier message: 06/09/2019, 16h13
  2. Réponses: 1
    Dernier message: 25/08/2017, 22h25
  3. Renaming From Excel - After Sorting Data in Excel
    Par cellophane dans le forum Dynamo BIM
    Réponses: 8
    Dernier message: 18/01/2016, 13h24
  4. Réponses: 3
    Dernier message: 06/06/2015, 11h18
  5. Variable 'If' Statement
    Par Nevin dans le forum Architecture - Family Creation
    Réponses: 1
    Dernier message: 05/06/2014, 06h25

Règles de messages

  • Vous ne pouvez pas créer de nouvelles discussions
  • Vous ne pouvez pas envoyer des réponses
  • Vous ne pouvez pas envoyer des pièces jointes
  • Vous ne pouvez pas modifier vos messages
  •