mysql - adding text to an xls file with bash script -
i'm trying understand if it's possible write xls file bash script. situation outlined below.
i have cronjob runs every monday , generates xls , emails client. xls filled data mysql db. when report empty , client attempts open it, shows corrupt. addressed issue excluding empty files email if statement. however, constraint 4 reports reach client - empty or not.
so question is, can add row of text @ top bash script file never "empty"? i'm not expert in bash scripting means, feedback here great. thanks!
tony
i'm not aware of pure bash implementation writing xls files. there solutions in other languages such perl, python, or php. if think outside box there option available you. mentioned use if statement not attach empty files. create blank spreadsheet in program ms excel, optionally enter text in a1 "no records", save it, , transfer known location on server runs cronjob. rather skipping attachment, whenever detect empty file in if statement attach blank "no records" template xls file. may need copy template temporary location before attaching if need rename file.
Comments
Post a Comment