如何使用VSTO创建新的“Personal.xlsb”?

huangapple go评论74阅读模式
英文:

How to make a new "Personal.xlsb" using VSTO?

问题

I'm trying to make a new Excel file, "Personal.xlsb," using VSTO.

I've tried to make a new workbook - regular one, with code below;

Microsoft.Office.Interop.Excel.Workbook myWorkBook = Globals.ThisAddIn.Application.Workbooks.Add();

Yes, it works well. But, as you know well, it cannot be a Personal.xlsb. So, what do I have to do? Using VSTO?

Let's say, I have nothing in the folder "C:\Users\user\AppData\Roaming\Microsoft\Excel\XLSTART".

英文:

I'm trying to make a new Excel file, "Personal.xlsb", using VSTO.

I've tried to make a new workbook - regular one, with code below;

Microsoft.Office.Interop.Excel.Workbook myWorkBook = Globals.ThisAddIn.Application.Workbooks.Add();

Yes, it works well. But, as you know well, it cannot be a Personal.xlsb. So, what do I have to do ? Using VSTO ?

Let's say, I have nothing in the folder
"C:\Users\user\AppData\Roaming\Microsoft\Excel\XLSTART".

答案1

得分: 1

使用Workbook.SaveAs方法,该方法将工作簿保存到不同的文件或格式中。XlFileFormat枚举包含所有支持的文件格式。

英文:

Use the Workbook.SaveAs method which saves the workbook in a different file or format. The XlFileFormat enum contains all the supported file formats.

huangapple
  • 本文由 发表于 2023年5月15日 03:01:08
  • 转载请务必保留本文链接:https://go.coder-hub.com/76249228.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定