df_idss = df_norows_skipped['EMS_TEMP']
                df_bodyEffect = df_norows_skipped['Output']
                df_qrr = df_norows_skipped['QRR']
                df_qg = df_norows_skipped['QG']

                ## call sanityCheck functions from library
                sclib.read_ratings(df_ratings)
                sclib.read_electrical_specs(df_specs)
                sclib.read_package_impedance(df_impedance)
                sclib.transfer_sanityCheck(df_transfer)
                sclib.gdson_sanityCheck(df_gdson)
                sclib.bodyEffect_sanityCheck(df_bodyEffect)
                sclib.bodyDiode_sanityCheck(df_bodyDiode)
                sclib.cap_sanityCheck(df_cap)
                sclib.bvdss_sanityCheck(df_bvdss)
                sclib.idss_sanityCheck(df_idss)
                sclib.qrr_sanityCheck(df_qrr)
                sclib.qg_sanityCheck(df_qg)

                ## excel file merging at the ouput_files folder
                excel_files = Path(param_path).glob('*.xlsx')

                ## define the final excel name
                finalexcelName = targetexcelName.split('.')[0]
                # print(finalexcelName) # debug

                with xw.App(visible=False) as app:
                    combined_wb = app.books.add()
                    for excel_file in excel_files:
                        wb = app.books.open(excel_file)
                        for sheet in wb.sheets:
                excel_name = output_path / f'{inputName}_Calibration.xlsx'

                ## call sanityCheck functions from library
                sclib.transfer_output_correlation(df_rows_skipped,
                                                  df_norows_skipped, inputName)
                sclib.read_ratings(df_ratings, excel_name)
                sclib.read_electrical_specs(df_specs, excel_name)
                sclib.read_package_impedance(df_impedance, excel_name)
                sclib.transfer_sanityCheck(df_transfer, df_ratings, inputName,
                                           excel_name)
                sclib.gdson_sanityCheck(df_gdson, inputName, excel_name)
                sclib.bodyEffect_sanityCheck(df_bodyEffect, inputName,
                                             excel_name)
                sclib.bodyDiode_sanityCheck(df_bodyDiode, inputName,
                                            excel_name)
                sclib.cap_sanityCheck(df_cap, inputName, excel_name)
                sclib.bvdss_sanityCheck(df_bvdss, inputName, excel_name)
                sclib.idss_sanityCheck(df_idss, inputName, excel_name)
                sclib.qrr_sanityCheck(df_qrr, inputName, excel_name)
                sclib.qg_sanityCheck(df_qg, inputName, excel_name)

                print('\nCreating mdms for ' f'{inputName}...')

            print('\nSanity check finished and mdm files created...')
            print('\nTotal elapsed time: %s seconds' %
                  (time.time() - start_time))

        except Exception as e:
            print(e.__class__, "occurred.")
            print(e)