// Hook: AfterPacketGeneration // Hide any worksheet whose name starts with an underscore. // // The "_" prefix is a common convention for staging or working sheets that // should never reach end users. Hiding them keeps the published packet tidy // without forcing template authors to maintain a separate "for internal use" // version of the workbook. int hidden = 0; foreach (var ws in Workbook.Worksheets) { if (ws.Name.StartsWith("_")) { ws.IsVisible = false; hidden++; Logger.LogInformation($"Hidden staging sheet: '{ws.Name}'"); } } if (hidden == 0) AddWarning("No underscore-prefixed staging sheets found to hide."); else Logger.LogInformation($"Hidden {hidden} staging sheet(s).");