Skip to content

Move to the paged document support in Verify 33.3: hidden sheets are read, and a sheet is a page - #154

Merged
SimonCropp merged 2 commits into
mainfrom
paged-documents
Oct 5, 2026
Merged

SimonCropp merged 2 commits into
mainfrom
paged-documents

Conversation

@SimonCropp

@SimonCropp SimonCropp commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Moves Verify.Sylvan.Data.Excel onto the source and derived targets that Verify 33.3 added for paged documents (Verify#1951), and takes the package from 1.0.0 to 2.0.0.

The converter now says which of its targets is the document and which were computed from it. Verify compares the document first, so a file derived from it is only given the benefit of its comparer while the document itself is unchanged, and DiffEngine's viewer shows the files derived from a document beneath it and accepts them with it.

It is a major version because what an existing test suite has to change is listed below. Verify and its adapter are pinned at 33.3.0.

Beyond the move

  • Hidden sheets are read. A reader does not read a hidden sheet unless it is asked to, so a hidden sheet had no csv. It now has one. Options passed with ExcelDataReaderOptions are used as they are, so with those a hidden sheet is read only when ReadHiddenWorksheets is set.
  • Hidden sheets are named under HiddenSheets in the info file, whether or not they are read. For an xlsx that includes a sheet only code can unhide, which a reader takes to be shown. For an xlsb or an xls such a sheet is read but not named.
  • A sheet is a page. PagesToInclude, which was ignored, leaves out the csv of a sheet, numbered by where it is among all the sheets of the workbook with hidden sheets counted. For an ExcelDataReader that is passed in, the pages are the sheets it has.

Migrating from 1.x

Version 2 moves to the source and derived targets of Verify 33.3. The API of this plugin is unchanged. What differs is that the workbook is now a snapshot too, and the name of a csv file, which Verify now decides, as it does for every plugin that has moved:

1.x 2.x
The workbook Not a snapshot Tests.Report.verified.xlsx
A workbook with one sheet Tests.Report.verified.csv Tests.Report#Sheet1.verified.csv
A workbook with several sheets Tests.Report#Sheet1.verified.csv Unchanged
The info file Tests.Report.verified.txt Unchanged, but for a workbook with a hidden sheet, which gains HiddenSheets
A hidden sheet Not read Tests.Report#Sheet2.verified.csv, as any other sheet

VerifierSettings.ExcludeTargets("xlsx") keeps the workbook out of the snapshots, as it was in 1.x.

A renamed snapshot shows as a new file and a pending delete. Accepting both, or running once with AutoVerify, moves a test over. The content of the csv is unchanged, so source control shows it as a rename.

Two cases that are less common also differ:

  • A workbook that is itself a named target has its csv files named relative to it: one named Attachment1 has #Attachment1.Sheet1.verified.csv, where 1.x did not use the name of the workbook. Passed to a verification as a Target, its info file takes the name as well: #Attachment1.verified.txt.
  • An ExcelDataReader that has been moved past its last sheet has no csv. In 1.x it had one, holding only a header row.

Testing

Run locally in Debug against Verify 33.3.0 from nuget.org: all tests pass.

A hidden sheet is read as any other unless options that are passed in say otherwise, and is named under HiddenSheets in the info file. For an xlsx that includes a sheet only code can unhide, which a reader takes to be shown.

PagesToInclude leaves out the csv of a sheet, numbered by where it is among all the sheets of the workbook with hidden sheets counted.
@SimonCropp SimonCropp added this to the 2.0.0 milestone Oct 5, 2026
@SimonCropp SimonCropp changed the title Move to the paged document support in Verify 33.3 Move to the paged document support in Verify 33.3: hidden sheets are read, and a sheet is a page Oct 5, 2026
@SimonCropp
SimonCropp merged commit 6afdf77 into main Oct 5, 2026
6 checks passed
@SimonCropp
SimonCropp deleted the paged-documents branch October 5, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant