bengbengbalabalabeng commented on PR #900:
URL: https://github.com/apache/fesod/pull/900#issuecomment-4353342047

   > Hi @bengbengbalabalabeng, I think it would be good to add a multi-sheet 
test case too. What do you think?
   > 
   > My understanding is that the original issue is caused by 
`afterSheetDispose` being called after every `writer.write(...)`. So when two 
tables are written to the same sheet, the callback runs twice for that sheet.
   > 
   > This PR moves the callback to `finish()`, which seems to fix the 
same-sheet case. But I think it may miss the multi-sheet case.
   > 
   > For example:
   > 
   > 1. `writer.write(data, sheet1)`
   > 2. `writer.write(data, sheet2)`
   > 3. `writer.finish()`
   > 
   > After writing `sheet2`, the current sheet is `sheet2`. So when `finish()` 
calls `afterSheetDispose`, only `sheet2` gets the callback.
   > 
   > I tried this locally, and the handler for `sheet1` had `afterSheetDispose` 
count `0`.
   > 
   > Could you also check this case please? I think `afterSheetDispose` should 
run once for each written sheet, not only for the last current sheet.
   
   Thank for the suggestion. I will follow up as soon as possible :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to