2012-02-15 11 views
1

私はウィンドウアプリケーションで作業しており、データシートをスプレッドシートにエクスポートしたいのですが、Microsoft Excel dllを使用せずにエクスポートするにはどうすればいいですか? openofficeについて検索しましたが、ウィンドウフォームに適切な解決策が見つかりませんでした。エクスポートは、C#winフォームでopenofficeを使用してExcel

答えて

0

Essential Studio XlsIO(.NETライブラリ)などの特定のサードパーティライブラリがあります。

サンプル:XlsIO

+0

無料ライブラリーはありますか? –

+0

CarlosAg Excel Xml Writerライブラリ、Smart Excel Lib(http://smartexcel.sourceforge.net/)、別の無料のライブラリ(http://www.codeproject.com/Articles/28795/Very-Simple-Library-to-Work -with-Excel-in-NET) –

+0

私はこのためにgoogle excelライブラリを使用しました。 –

0

私はこのためにGoogleのExcelのライブラリを使用していました。

<a href="http://code.google.com/p/excellibrary/downloads/detail?name=ExcelLibrary_20110730.zip&can=2&q=">Excel Library</a>をソリューションに追加してこのコードを使用してください。

DataSet ds = new DataSet(); 
DataTable dt1 = new DataTable(); 

//Set the locale for each 
ds.Locale = System.Threading.Thread.CurrentThread.CurrentCulture; 
dt1.Locale = System.Threading.Thread.CurrentThread.CurrentCulture; 

dt1 = Extensions.AsDataTable(objEntityDataModel.smme_campaign_report(campId)); 
ds.Tables.Add(dt1); 

//set the campaign name and create word file 
ExcelLibrary.DataSetHelper.CreateWorkbook(@"d:\\" + campaignName + ".xlsx", ds); 
関連する問題