Created
August 29, 2016 06:34
-
-
Save cocodrips/729855438297ae6ba88c4a6f66790633 to your computer and use it in GitHub Desktop.
Excelの選択してるCellとる
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Excel = Microsoft.Office.Interop.Excel; | |
# ... | |
public List<string> GetSelectedItems() { | |
Excel.Range range = Globals.ThisAddIn.Application.Selection as Excel.Range; | |
List<string> cells = new List<string>(); | |
foreach (string cell in range.Value) | |
{ | |
cells.Add(cell); | |
} | |
return cells; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment