0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

cscの作法 その270

Posted at

概要

cscの作法、調べてみた。
unvell.ReoGrid.dll使って、みた。
練習問題やってみた。

練習問題

reogridに、csvを読み込め、そしてセーブせよ。

写真

image.png

サンプルコード

using System;
using System.Windows.Forms;
using System.Drawing;
using unvell.ReoGrid;

class form1: Form {
	ReoGridControl grid;
	form1() {
		Text = "ReoGrid";
		ClientSize = new Size(800, 500);
		grid = new ReoGridControl() {
			Dock = DockStyle.Fill,
		};
		this.Controls.Add(grid);
		CreateMenu();
		grid.Load("test3.csv");
	}
	void CreateMenu() {
		ToolStripMenuItem menuItemGenerate = new ToolStripMenuItem("save");
		menuItemGenerate.Click += MenuItemGenerate_Click;
		MenuStrip menuStrip = new MenuStrip();
		this.Controls.Add(menuStrip);
		menuStrip.Items.Add(menuItemGenerate);
	}
	private void MenuItemGenerate_Click(object sender, EventArgs e) {
		var worksheet = grid.CurrentWorksheet;
		worksheet.Save("test3.csv");
		MessageBox.Show("ok");
	}
	[STAThread]
	public static void Main() {
		Application.Run(new form1());
	}
}


以上。

0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?