Skip to content

Instantly share code, notes, and snippets.

#region 変数定義
// アプリケーション
Excel.Application thisApp = Globals.ThisAddIn.Application;
// 現在のブック
Excel.Workbook thisBook = thisApp.ActiveWorkbook;
// 現在のシート
Excel.Worksheet thisSheet = thisBook.ActiveSheet;
// シートの最終データセルを取得
Excel.Range lastCell = thisSheet.Cells.SpecialCells(Excel.XlCellType.xlCellTypeLastCell);
@zaconeco
zaconeco / targetblank.js
Created November 17, 2016 04:49
特定のリンクにだけ TargetBlank を追加する
// TargetBlankの対象リンクを配列に格納する
var blankLinks = [
"http://hogehoge/hoge/",
"http://hogehoge2.com"
];
$(function(){
$.each(blankLinks,function(index,value){
$("a[href='"+value+"']").attr({target:"_blank"});
});
function createSplitterValue(targetStr)
{
var names = targetStr.split('_');
var setName = '';
for( var i=0 ; i<names.length ; i++ ) {
setName += names[i] + "<br />";
}
return setName;
}
@zaconeco
zaconeco / ConvineBooks.cs
Created June 22, 2016 06:36
ConvineBooks
private void ConvineBooks(object sender, RibbonControlEventArgs e)
{
// アプリケーション
Excel.Application thisApp = Globals.ThisAddIn.Application;
// 現在のブック
Excel.Workbook thisBook = thisApp.ActiveWorkbook;
using (FolderBrowserDialog fbd = new FolderBrowserDialog())
{
if (fbd.ShowDialog() == DialogResult.OK)
// アパレルクラス
private class APPAREL
{
public APPAREL()
{
}
public APPAREL(string shop, string itemName, Sizes size, int stock, int price)
{
this.Shop = shop;
this.ItemName = itemName;