Skip to main content
Solved

If no data comes through the workbench to a specific excel worksheet how do I ensure that the writer shows no data.


I have a workbench to look at changes between a new worksheet and an old worksheet. These data populate three tabs in a workbook: "changed", "deleted", "updated". The intial run populated the deleted tab with a few records that had been deleted. I re-ran the workbench with matching data and the "deleted data" remained on the deleted tab. I would like the data on the tabs to be overwritten each time.

Best answer by markatsafe

@kat18 The Truncate Existing Sheet on the feature type, as suggested by @ebygomm, only works if you write a feature to the sheet. The same with writer option Overwrite existing File = Yes. This looks like something we should fix.

In the meantime, add a Creator to your workspace and set Create at End = Yes. This will write a blank row to your sheet and trigger the truncate or overwrite, depending on which one you choose.

View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

ebygomm
Influencer
Forum|alt.badge.img+43
  • Influencer
  • February 6, 2020

There should be an option to truncate existing sheets/named ranges


Forum|alt.badge.img+2
  • Best Answer
  • February 6, 2020

@kat18 The Truncate Existing Sheet on the feature type, as suggested by @ebygomm, only works if you write a feature to the sheet. The same with writer option Overwrite existing File = Yes. This looks like something we should fix.

In the meantime, add a Creator to your workspace and set Create at End = Yes. This will write a blank row to your sheet and trigger the truncate or overwrite, depending on which one you choose.


erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • February 6, 2020

Another option would be to use an empty Excel workbook with the three tabs as a template.

The three tabs would only contain the attribute headers.

Then the output workbook would always have the three tabs, with or without data.

You can find that setting in the Navigator window under the Excel writer.


  • Author
  • February 7, 2020
markatsafe wrote:

@kat18 The Truncate Existing Sheet on the feature type, as suggested by @ebygomm, only works if you write a feature to the sheet. The same with writer option Overwrite existing File = Yes. This looks like something we should fix.

In the meantime, add a Creator to your workspace and set Create at End = Yes. This will write a blank row to your sheet and trigger the truncate or overwrite, depending on which one you choose.

Thanks Mark, that seemed to have work. I have added in a Sorter to ensure that the Created line comes at the end of the data to stop generation of a blank row at the top. Otherwise it seems to be functioning as I would expect. Thank you again, Kat


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings