0
実行時にExcelシートを作成するために、Visual Studio 2013でWindows 8.1アプリケーションを開発しています。 Visual Studioは、すべてのエラーを表示しませんが、私はアプリを実行したときに、ある実行時エラーがあります:必要なメンバーに関するエラーを取得する
エラー1人の欠落コンパイラに必要なメンバー は「System.Runtime.InteropServices.LCIDConversionAttribute..ctor」 D:エラーのためにVS-2013に示す赤いラインが存在しない、上記のコードで
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; using Windows.Foundation; using Windows.Foundation.Collections; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Controls.Primitives; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Input; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Navigation; // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238 namespace excel { /// <summary> /// An empty page that can be used on its own or navigated to within a Frame. /// </summary> public sealed partial class MainPage : Page { public MainPage() { this.InitializeComponent(); Microsoft.Office.Interop.Excel.Application excelApp = new Microsoft.Office.Interop.Excel.Application(); Microsoft.Office.Interop.Excel.Workbook workbook = null; Microsoft.Office.Interop.Excel.Workbooks workbooks = null; Microsoft.Office.Interop.Excel._Worksheet worksheet = null; workbooks = excelApp.Workbooks; workbook = workbooks.Add(1); worksheet = (Microsoft.Office.Interop.Excel.Worksheet)workbook.Sheets[1]; excelApp.Visible = true; worksheet.Cells[1, 1] = "Value1"; worksheet.Cells[1, 2] = "Value2"; worksheet.Cells[1, 3] = "Addition"; } } }
:\ GS \プロジェクト\エクセル\エクセル\ CSCエクセルここ
は、私のCSコードです。 Excel用の参考文献を追加しました:Microsoft.Office.Interop.Excel
誰にも解決策がありますか?
私はsyncfusion.core dllで試してみましたが、別のエラーがあります。そのエラーを解決するために、私は何かをダウンロードします。Syncfusion.XlsIO.Base dllそして別のエラーがあります。そのエラーを解決するには、Microsoft.Office.Interop.Excelをダウンロードしてください。明らかにここにはエラーがあります。 –
解決方法はありますか? –