ExtractExcel, Version 1.00 Filter values from a source spreadsheet and write them to a target spreadsheet Usage: ExtractExcel /SOURCE src /TARGET tgt /COLS "cols" [ options ] Where: src is the source file name and optional sheet name or index (e.g. source.xlsx "Sheet 2"; default sheet index 1) tgt is the target file name and optional sheet name or index (e.g. target.xlsx 3; default sheet index 1; file is created if it does not exist, in which case sheet will be ignored) cols is a list or range of columns to be read from the source file (letters, e.g. "A..D,F,AA..AG", case insensitive, mandatory unless rows are specified, default if rows specified: "A..Z") Options: /ROWS rows list or range of rows to be used from source file (numeric, e.g. "1,3,5..8,14", default: "1..100") /OFFSET startrow first row in target sheet to be written (numeric, default: 1) /WHERE query filter rule, source row will be skipped if it does not comply (see notes; default: do not skip) Notes: Queries format is "column operator value/column", e.g. "A < 0", "B > C" or "AF != 1.5"; whitespace is allowed; columns must be in upper case! Queries are interpreted by mXparser (https://mathparser.org/) See its tutorial at https://mathparser.org/mxparser-tutorial/ for details on more complex filter expressions, e.g. "(A=10)|(B<0)". Return code ("errorlevel") -1 in case of errors, otherwise 0. Credits: Code to replace column by cell value by Vladimir https://stackoverflow.com/a/62778031 Query parsing by mXparser https://mathparser.org/ Manipulating Excel files by Microsoft.Office.Interop.Excel https://www.nuget.org/packages/Microsoft.Office.Interop.Excel Written by Rob van der Woude https://www.robvanderwoude.com