知りたいこと
Windows FormsアプリからOffice365.NETのEXCELワークブックを新規作成するときの参照設定が複数存在し、どれを選択してもEXCELブックを新規作成できました。これらの参照設定の違いはなんでしょうか?出力されたブックファイルの拡張子はいずれもxlsxです。
以下に詳細を記します。
(1) Microsoft.Office.Interop.Excel
場所・・・C:\Program Files\Microsoft Office\root\Office16
(2) Microsoft Excel 16.0 Object Library
場所・・・E:\Program Files (x86)\Microsoft Visual Studio\Shared\Visual Studio Tools for Office\PIA\Office15
よろしくお願いします。
該当のソースコード
Imports Microsoft.Office.Interop Imports Microsoft.Office.Interop.Excel Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Dim ap As New Excel.Application Dim bk As Excel.Workbook Dim st As Excel.Worksheet ap.Visible = True ap.ScreenUpdating = True bk = ap.Workbooks.Add st = bk.Worksheets(1) Dim rg As Excel.Range rg = st.Cells(1, 1) rg.Value = "Hello" End Sub End Class
環境
Microsoft Windows 10 Home (Version 10.0.17134 Build 17134)
Microsoft Visual Studio Community 2017 (Version 15.9.2)
Microsoft.NET Framework (Version 4.7.03056)
Microsoft Excel For Office 365 MSO(16.0.11029.20045)64ビット
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/12/12 05:52