【c#】15. ExcelMechanisms
来源:互联网 发布:农村淘宝推广招聘信息 编辑:程序博客网 时间:2024/06/16 04:36
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace UserDefinedDataEXP{ class ExcelMechanisms { private static ExcelDriver excel; static ExcelMechanisms() { // This static constructor ensures that only one // instance of Excel is started. excel = new ExcelDriver(); excel.MakeVisible(true); } public ExcelMechanisms() { } // etc. // 函数printAssocMatrixInExcel // Print a two-dimensional associative array (typically, one time level); // Recall: row, column and value parameters public void printAssocMatrixInExcel<R, C, T>(AssocMatrix<R, C, T> matrix, string SheetName) { excel.AddAssocMatrix(matrix, SheetName); } //把二叉树或者三叉树打印到Excel public void printLatticeInExcel(Lattice<double> lattice, Vector<double> xarr, string SheetName) { List<string> rowlabels = new List<string>(); for (int i = xarr.MinIndex; i <= xarr.MaxIndex; i++) { rowlabels.Add(xarr[i].ToString()); } excel.AddLattice(SheetName, lattice, rowlabels); } //把(x,y)生成Excel图 public void printOneExcel<T>(Vector<T> x, Vector<T> y, string title, string horizontal, string vertical, string legend) { // N.B. Excel has limit of 8 charts; after that a run-time error ExcelDriver excel = new ExcelDriver(); excel.MakeVisible(true); // Default is INVISIBLE! excel.CreateChart<T>(x, y, title, horizontal, vertical,legend); } }}
0 0
- 【c#】15. ExcelMechanisms
- 【C#】15. ExcelDriver
- <C++>15.this指针
- c
- c
- c
- c
- C
- c
- c
- c
- C+
- c
- C
- c
- c
- c
- C
- HTMl基础
- 【C#】14. printOneExcel在Excel里作图 & 利率插值计算(线性)
- Java进程与线程
- [Leetcode]Merge Intervals
- 【C#】15. ExcelDriver
- 【c#】15. ExcelMechanisms
- javascript读书笔记3----实现公有和私有成员
- FDM之二维静态热传导--含有不同传导系数K
- #(Linux)Ubuntu使用# bash shell 无法执行cd
- LeetCode 136 Single Number
- LeetCode 104 Maximum Depth of Binary Tree
- LeetCode 100 Same Tree
- LeetCode 191 Number of 1 Bits
- URAL 1925. British Scientists Save the World