-
Notifications
You must be signed in to change notification settings - Fork 635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return data instead of void for export node #11666
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @QilongTang . I'm afraid this approach is not compatible with what the Data.ExportToExcel
node does. That was my reason for returning void
in the first place. Allow me to illustrate with an example.
Starting with this spreadsheet:
And using this graph to only write the "C3" cell:
You can see in the watch node that the Data.ExportToExcel
node returns all of the spreadsheet data. However, if I tried this with the Data.OpenXmlExportExcel
node I would only get the passed in data, that is 20
.
Given the differences in the implementations of the nodes, I don't think there is an easy way to do this, other than doing what the Data.OpenXmlImportExcel
node does, but that might be overkill considering the spreadsheet data might no be needed after written and also users can always use the Data.OpenXmlImportExcel
node itself if they do need it.
What about writing a success or failure bool. Void seems like a bad pattern in a data flow language’s library.
… On May 5, 2021, at 8:50 AM, Martin Misol Monzo ***@***.***> wrote:
@mmisol requested changes on this pull request.
Hi @QilongTang . I'm afraid this approach is not compatible with what the Data.ExportToExcel node does. That was my reason for returning void in the first place. Allow me to illustrate with an example.
Starting with this spreadsheet:
And using this graph to only write the "C3" cell:
You can see in the watch node that the Data.ExportToExcel node returns all of the spreadsheet data. However, if I tried this with the Data.OpenXmlExportExcel node I would only get the passed in data, that is 20.
Given the differences in the implementations of the nodes, I don't think there is an easy way to do this, other than doing what the Data.OpenXmlImportExcel node does, but that might be overkill considering the spreadsheet data might no be needed after written and also users can always use the Data.OpenXmlImportExcel node itself if they do need it.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@mmisol @mjkkirschner I can change the implementation so that we always follow up the write request with a read function call so that this node could return all the data. This may not be 100% ideal performance wise but will be purely done for consistency, what do you think? |
@QilongTang can we characterize what the performance cost is? |
@mjkkirschner That would depend on the size of the sheet. If we are dealing with one that is very large, it could take a few extra seconds, plus a chunk of memory. I think returning something like a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @QilongTang . This looks good to me
Merging since all checks passing |
Please Note:
DynamoRevit
repo will need to be cherry-picked into all the DynamoRevit Release branches that Dynamo supports. Contributors will be responsible for cherry-picking their reviewed commits to the other branches after aLGTM
label is added to the PR.Purpose
Return bool instead of void for node
OpenXMLExportExcel
to indicate of the node has successfully written data into spreadsheetDeclarations
Check these if you believe they are true
*.resx
filesReviewers
@mmisol
FYIs
(FILL ME IN, Optional) Names of anyone else you wish to be notified of