I have 33 Excel files I want to print.
They are all just 1 page A4 size.
I was hoping I could use the script below in bash, but I get this error from lp:
Quote:
lp: Unsupported document-format "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet".
|
I don't really want to open each file and then click print.
Any tips please? Maybe convert to PDF??
Code:
#! /bin/bash
echo "This script should print all the files in a given directory."
echo "Easiest is go to that directory first."
XLfiles="/home/pedro/winter2021/20EAP/individual_stats/*.xlsx" # local machine
# batch print Excel files
for X in $XLfiles;
do
echo "This is one of the files:"
printf $X;
printf "\n";
echo "Now sending the file to the printer ... "
lp -d "EPSON-L380-Series" $X;
done
echo "All files sent to the printer!"
echo "All done!"