This is a tool pack to generate, split and check Excel files with random data.
- Generate Excel files with random data which can exceed the row limit of
1048576. - Split Excel files into multiple files which won't exceed row limit.
- Check Excel file's row count.
The generated Excel files can be used to test the condition when row count exceed the limit of 1048576, so it won't be able to open properly.
In our case, we were testing against OPSWAT's CDR (Content Disarm and Reconstruction) technology, which can detect and reconstruct malicious data.
# Clone the repo
git clone https://github.com/opabravo/dummy-excel-tools
cd dummy-excel-tools
# Install required python packages via poetry
poetry installPS: Not using pandas to split the csv file because csv is lighter and faster for the purpose.
# Activate virtual environment
poetry shell
# Run the script
python main.pyUsage: main.py [OPTIONS] COMMAND [ARGS]...
Dummy Excel file tools CLI
Options:
--help Show this message and exit.
Commands:
check Get excel file's row count
gen Generate excel file with random data
split Split excel file into multiple files which won't exceed row limit
