我在Excel中使用了一个适当的插件来计算金融数学函数。我想将结果保存在csv文件中以便进一步操作。如何将Sheet2保存为mytestfile.csv,然后保存并关闭Excel?
wb = xw.Book(path1 + "1VALVBA.xlsm")
wb.app.api.RegisterXLL("C:/Windows/System32/vsoft15.xll")`enter code here`
# activate addin
wb.macro("ScreenASX1")()
# Run the VBA in Excel. Results appear in Sheet2
sheet = wb.sheets['Sheet2']