LoginSignup
0
0

cscの作法 その338

Posted at

概要

cscの作法、調べてみた。
closedxml、やってみた。

写真

image.png

サンプルコード


using System;
using System.IO;
using ClosedXML.Excel;

namespace App
{
	class Program {
		static void Main(string[] args) {
			var filePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "Book3.xlsx");
			var wb = new XLWorkbook();
			var ws = wb.Worksheets.Add("Sheet1");
			ws.Cell(1, 1).Value = "Hello World!";
			wb.SaveAs(filePath);
			Console.WriteLine("ok");
		}
	}
}





コンパイル手順

>set PATH=C:\Windows\Microsoft.NET\Framework\v4.0.30319;%PATH%


>csc excel3.cs /reference:ClosedXML.dll

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0