Closed ondejcik closed 9 years ago
@aparajit-pratap ,Why are we converting the int into float? how can we keep the value same as entered in excel
Let me check this. Thanks for pointing it out. This is being tracked by: http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-7347
@ondejcik all numbers in Excel files are read as floats by Excel by default. It is not worth CPU time to check if a number is meant to be an int
, then returning it as an int
and if it is meant to be a float
, returning it as a float
. This can make reading Excel files even slower than Excel interop already is. There is however a workaround you can use. If you expect all values in the file to be integers, you can change the number precision in Dynamo. Go to Settings
=> Number Format
. Change its value to 0
.
ok but is it not possible to read from excel all text and numbers as string ? it would solve my problem, i have both floats and integers in excel and i need to pass the to revit as string anyway.
@ondejcik , Which Revit node are you using to write into sheet?
@ondejcik yes it is possible to read from excel as strings. That way you will get the data exactly as you see it in the excel file however in Dynamo the ReadFromFile
node is meant to read strings as strings and numbers as numbers so that users can use those numbers and perform further computation with them. We will evaluate whether it would be useful to add a new Read
node to Excel to read all data as strings and get back to you.
Btw, could you tell us which Revit node you are using to write data to it?
Additionally if you run the graph below, you will see that the Write
node actually writes the data in the same format as read from the original excel file.
@aparajit-pratap @monikaprabhu
my definition looks like this: (in short; i read excel, pick some cells i need and write them to parameterslots in families in revit, (tree data, 200+ parameters) then all data show directly to revit sheets (via revit schedules ) and that is why i need them to look same as in excel, all parameters in revit are generated automaticaly and contain string data)
thanks!
@ondejcik This is fixed here: https://github.com/DynamoDS/Dynamo/pull/4548
Let us know what you think.
Hi,
Thanks for implemetation in a first place. However i have still one probem. I got an error when i a reading my excel file with true setting on. I wonder where culd be an error. I would guess it does not like empty fields.
case 1
Works
does not work
used excel:
it works if the are no empty cells
case 2
used excel
@ondejcik thanks for pointing this out and sorry for the oversight. This is now fixed in: #4572
Hi,
i have problem with component that reads excel data, it autoaticaly converts numbers to float without chceking if they are intergers, and adds a lot of zeros.
it looks weird when i write values to to revit components that go out on sheets
would it be possible to have component that consideres all data from excel as string ? so the values look exact as in excel? there already is component string to number that could take hand of numbers if needed,
thanks