The source file and the working set do not need to be the same size

A TDMS recording may contain millions of samples because it was created for acquisition, archiving, or later analysis. That does not mean every downstream task needs millions of spreadsheet rows.

If your goal is to inspect a transient, compare a test window, send a small example to a colleague, or prepare data for a report, the useful working set may be only a fraction of the original Channel.

Choose the range before creating the CSV

One way to avoid an oversized intermediate file is to make the range decision while the data is still in TDMS. TdmsSlice lets you select one Channel and specify Start index and Count before CSV export.

This is different from first converting an entire TDMS Channel to CSV and then deleting most of the rows afterward.

  1. Identify the Channel required for the spreadsheet task.
  2. Use metadata and Quick Preview, when available, to locate the area of interest.
  3. Set a sample range that is appropriate for the next step.
  4. Export only that range to CSV.
  5. Open the smaller CSV in the spreadsheet or other downstream tool.

Keep enough context to understand the subset later

A small CSV is easier to handle, but a subset can become ambiguous if you forget where it came from. Preserving the original sample Index helps keep the exported rows tied to the source Channel.

The companion metadata JSON can also retain source and export context that would otherwise be lost when data is reduced to a plain table.

A spreadsheet is one destination, not the definition of the workflow

The same range-export approach can be useful even when the final destination is not Excel. A small CSV can also be convenient for a script, a plotting tool, a notebook, a database import, or a quick comparison with another system.

The main idea is to reduce the transfer to the data that the next step actually needs.