本文整理汇总了C#中Sheet.Put方法的典型用法代码示例。如果您正苦于以下问题:C# Sheet.Put方法的具体用法?C# Sheet.Put怎么用?C# Sheet.Put使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sheet
的用法示例。
在下文中一共展示了Sheet.Put方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ManyCellsExist
public void ManyCellsExist()
{
var sheet = new Sheet();
sheet.Put("A1", "First");
sheet.Put("X27", "Second");
Assert.That(sheet.Get("A1"), Is.EqualTo("First"));
Assert.That(sheet.Get("X27"), Is.EqualTo("Second"));
}
示例2: TextCellsAreStored
public void TextCellsAreStored()
{
var sheet = new Sheet();
const string theCell = "A21";
sheet.Put(theCell, "A string");
Assert.That(sheet.Get(theCell), Is.EqualTo("A string"));
}
示例3: NumericCellsAreIdentifiedAndStored
public void NumericCellsAreIdentifiedAndStored()
{
var sheet = new Sheet();
const string theCell = "B14";
sheet.Put(theCell, "14");
Assert.That(sheet.Get(theCell), Is.EqualTo("14"));
sheet.Put(theCell, " 99 X");
Assert.That(sheet.Get(theCell), Is.EqualTo(" 99 X"));
sheet.Put(theCell, " 1234 ");
Assert.That(sheet.Get(theCell), Is.EqualTo("1234"));
sheet.Put(theCell, " ");
Assert.That(sheet.Get(theCell), Is.EqualTo(" "));
}
示例4: WeHaveAccessToCellLiteralValuesForEditing
public void WeHaveAccessToCellLiteralValuesForEditing()
{
var sheet = new Sheet();
const string theCell = "C21";
sheet.Put(theCell, "Some string");
Assert.That(sheet.GetLiteral(theCell), Is.EqualTo("Some string"));
sheet.Put(theCell, " 1234 ");
Assert.That(sheet.GetLiteral(theCell), Is.EqualTo(" 1234 "));
sheet.Put(theCell, "=7");
Assert.That(sheet.GetLiteral(theCell), Is.EqualTo("=7"));
}