Return data instead of void for export node#11666
Conversation
mmisol
left a comment
There was a problem hiding this comment.
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 |
mmisol
left a comment
There was a problem hiding this comment.
Thanks @QilongTang . This looks good to me
|
Merging since all checks passing |
Please Note:
DynamoRevitrepo 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 aLGTMlabel is added to the PR.Purpose
Return bool instead of void for node
OpenXMLExportExcelto indicate of the node has successfully written data into spreadsheetDeclarations
Check these if you believe they are true
*.resxfilesReviewers
@mmisol
FYIs
(FILL ME IN, Optional) Names of anyone else you wish to be notified of