0

我已经在我的电脑上安装了 JMP12+14。我使用以下代码在python中打开jmp文件,但它总是卡在代码行'doc = jmp.OpenDocument(src_file)',无一例外。有谁知道如何解决以下问题?

jmp = Dispatch("JMP 12.Application")
try:
    doc = jmp.OpenDocument(src_file)
    doc.SaveAs(dest_file)
    df = pd.read_csv(dest_file) # pd.read_csv(dest_file, sep='\t')
except Exception as e:
    logger.info(f"{date_to_convert} - Failed to convert file from {src_file} to {dest_file}.[Exception]")
    logger.error(traceback.format_exc())
    return date_to_convert, False, dest_file, pd.DataFrame()
else:
    logger.info(f"{date_to_convert} - Succeed to convert file from {src_file} to {dest_file}.[END]")
    return date_to_convert, True, dest_file, df
4

0 回答 0