今天替换掉的程序
2021/7/19 17:08:49
本文主要是介绍今天替换掉的程序,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
- 主页面两个预测
public void ShowPredictCurve() { Workbook workbook = new Workbook(); workbook.LoadFromFile(@"F:/data.xlsx"); Worksheet sheetPxA = workbook.Worksheets[0]; Worksheet sheetPxB = workbook.Worksheets[1]; Worksheet sheetPxC = workbook.Worksheets[2]; Worksheet sheetPxD = workbook.Worksheets[3]; Worksheet sheetPyA = workbook.Worksheets[4]; Worksheet sheetPyB = workbook.Worksheets[5]; Worksheet sheetPyC = workbook.Worksheets[6]; Worksheet sheetPyD = workbook.Worksheets[7]; CellRange rangePxA = sheetPxA.Range[sheetPxA.FirstRow, sheetPxA.FirstColumn, sheetPxA.LastRow, sheetPxA.LastColumn]; DataTable dtPxA = sheetPxA.ExportDataTable(rangePxA, true, true); CellRange rangePxB = sheetPxB.Range[sheetPxB.FirstRow, sheetPxB.FirstColumn, sheetPxB.LastRow, sheetPxB.LastColumn]; DataTable dtPxB = sheetPxB.ExportDataTable(rangePxB, true, true); CellRange rangePxC = sheetPxC.Range[sheetPxC.FirstRow, sheetPxC.FirstColumn, sheetPxC.LastRow, sheetPxC.LastColumn]; DataTable dtPxC = sheetPxC.ExportDataTable(rangePxC, true, true); CellRange rangePxD = sheetPxD.Range[sheetPxD.FirstRow, sheetPxD.FirstColumn, sheetPxD.LastRow, sheetPxD.LastColumn]; DataTable dtPxD = sheetPxD.ExportDataTable(rangePxD, true, true); CellRange rangePyA = sheetPyA.Range[sheetPyA.FirstRow, sheetPyA.FirstColumn, sheetPyA.LastRow, sheetPyA.LastColumn]; DataTable dtPyA = sheetPyA.ExportDataTable(rangePyA, true, true); CellRange rangePyB = sheetPyB.Range[sheetPyB.FirstRow, sheetPyB.FirstColumn, sheetPyB.LastRow, sheetPyB.LastColumn]; DataTable dtPyB = sheetPyB.ExportDataTable(rangePyB, true, true); CellRange rangePyC = sheetPyC.Range[sheetPyC.FirstRow, sheetPyC.FirstColumn, sheetPyC.LastRow, sheetPyC.LastColumn]; DataTable dtPyC = sheetPyC.ExportDataTable(rangePyC, true, true); CellRange rangePyD = sheetPyD.Range[sheetPyD.FirstRow, sheetPyD.FirstColumn, sheetPyD.LastRow, sheetPyD.LastColumn]; DataTable dtPyD = sheetPyD.ExportDataTable(rangePyD, true, true); int len = dtPxA.Columns.Count; string[] cellValuePxA = new string[len]; string[] cellValuePxB = new string[len]; string[] cellValuePxC = new string[len]; string[] cellValuePxD = new string[len]; string[] cellValuePyA = new string[len]; string[] cellValuePyB = new string[len]; string[] cellValuePyC = new string[len]; string[] cellValuePyD = new string[len]; chartPredictCurveWater.Series[0].Points.Clear(); chartPredictCurveWater.Series[1].Points.Clear(); chartPredictCurveWater.Series[2].Points.Clear(); chartPredictCurveWater.Series[3].Points.Clear(); chartPredictCurveOrganic.Series[0].Points.Clear(); chartPredictCurveOrganic.Series[1].Points.Clear(); chartPredictCurveOrganic.Series[2].Points.Clear(); chartPredictCurveOrganic.Series[3].Points.Clear(); for (int i = 0; i <= len - 1; i++) { cellValuePxA[i] = (string)dtPxA.Rows[0][i]; chartPredictCurveWater.Series[0].Points.AddXY(i, cellValuePxA[i]); cellValuePxB[i] = (string)dtPxB.Rows[0][i]; chartPredictCurveWater.Series[1].Points.AddXY(i, cellValuePxB[i]); cellValuePxC[i] = (string)dtPxC.Rows[0][i]; chartPredictCurveWater.Series[2].Points.AddXY(i, cellValuePxC[i]); cellValuePxD[i] = (string)dtPxD.Rows[0][i]; chartPredictCurveWater.Series[3].Points.AddXY(i, cellValuePxD[i]); cellValuePyA[i] = (string)dtPyA.Rows[0][i]; chartPredictCurveOrganic.Series[0].Points.AddXY(i, cellValuePyA[i]); cellValuePyB[i] = (string)dtPyB.Rows[0][i]; chartPredictCurveOrganic.Series[1].Points.AddXY(i, cellValuePyB[i]); cellValuePyC[i] = (string)dtPyC.Rows[0][i]; chartPredictCurveOrganic.Series[2].Points.AddXY(i, cellValuePyC[i]); cellValuePyD[i] = (string)dtPyD.Rows[0][i]; chartPredictCurveOrganic.Series[3].Points.AddXY(i, cellValuePyD[i]); } }
这篇关于今天替换掉的程序的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2025-01-09必试!帮 J 人团队解决物流错发漏发的软件神器!
- 2025-01-09不容小觑!助力 J 人物流客服安抚情绪的软件!
- 2025-01-09为什么医疗团队协作离不开智能文档工具?
- 2025-01-09惊叹:J 人团队用啥软件让物流服务快又准?
- 2025-01-09如何利用数据分析工具优化项目资源分配?4种工具推荐
- 2025-01-09多学科协作难?这款文档工具可以帮你省心省力
- 2025-01-09团队中的技术项目经理TPM:工作内容与资源优化策略
- 2025-01-09JIT生产管理法:优化流程,提升竞争力的秘诀
- 2025-01-092024全球互联网流量分析报告
- 2025-01-09如何提升学校行政管理中的进度追踪效率?4个实用策略和3款工具推荐