Skip to content
HOW TO

Process CSV Files

Goal

Read, transform, and write delimited files from Excel.

Prerequisites

  • Read and write permission for the input and output directories.
  • A known delimiter, file-name pattern, and expected arrival condition.
  • A protected output path or an explicit user trigger for writes.

Steps

1. Watch the input directory or identify matching files after the readiness time.

=U.WATCH_FILES(C4,C5,TRUE)

2. Read each ready file and keep the file name as its cache key when useful.

=U.READ_FILE(B12,,,,B22)

3. Combine and sort the loaded rows.

=U.CACHE(U.VSORT(U.VAPPEND(C22:C25)),C28)

4. Write only after the readiness check succeeds.

=IF(C18,U.WRITE_FILE(C32,C29),"not ready")

Result

Matching files are read, normalized, combined, and written only after the readiness condition succeeds.

Common Variations

  • Use U.WATCH_FILES to trigger discovery only after relevant filesystem changes.
  • Cache large inputs when only a small derived output needs to remain in the workbook.
  • Read multiple file paths directly through supported append configuration.

Troubleshooting

  • If no files appear, verify directory, pattern, earliest write time, and permissions.
  • If fields parse incorrectly, inspect raw delimiters and locale-sensitive numeric/date conversion.
  • If writes repeat, move the write behind a readiness transition or explicit event.