本文整理汇总了C#中Worksheet.AddRow方法的典型用法代码示例。如果您正苦于以下问题:C# Worksheet.AddRow方法的具体用法?C# Worksheet.AddRow怎么用?C# Worksheet.AddRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Worksheet
的用法示例。
在下文中一共展示了Worksheet.AddRow方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FastExcelWriteAddRowDemo
private void FastExcelWriteAddRowDemo(FileInfo outputFile)
{
Console.WriteLine();
Console.WriteLine("DEMO WRITE 3");
Stopwatch stopwatch = new Stopwatch();
using (FastExcel.FastExcel fastExcel = new FastExcel.FastExcel(outputFile))
{
Worksheet worksheet = new Worksheet();
for (int rowNumber = 1; rowNumber < NumberOfRecords; rowNumber++)
{
worksheet.AddRow(1 * DateTime.Now.Millisecond
, 2 * DateTime.Now.Millisecond
, 3 * DateTime.Now.Millisecond
, 4 * DateTime.Now.Millisecond
, 45678854
, 87.01d
, "Test 2" + rowNumber
, DateTime.Now.ToLongTimeString());
}
stopwatch.Start();
Console.WriteLine("Writing using AddRow(params object[])...");
fastExcel.Write(worksheet, "sheet4");
}
Console.WriteLine(string.Format("Writing using AddRow(params object[]) took {0} seconds", stopwatch.Elapsed.TotalSeconds));
}