Dear Sir,
Please help me to display .csv file in web page
TimestamptestingG-Se 17340049G-Se 17340049G-Se 17340049G-Se 17340049G-Se 17340049G-Se 17340049pHpHOIL and GreaseOIL and GreaseConductivityConductivityFlowFlowTemperatureTemperatureMeasurement interval=300[sec] (Export-Aggregation disabled)StatusCOD - Measured value [mg/l] (Limit:0.00-1250.00)Status [COD - Measured value]BOD - Measured value [mg/l] (Limit:0.00-3750.00)Status [BOD - Measured value]TSS - Measured value [mg/l] (Limit:0.00-2500.00)Status [TSS - Measured value]pH - Measured value [units] (Limit:0.00-14.00)Status [pH - Measured value]Oil and Grease - Measured value [mg/l] (Limit:0.00-80.00)Status [Oil and Grease - Measured value]Conductivity - Measured value [uS/cm] (Limit:0.00-2000.00)Status [Conductivity - Measured value]Flow - Measured value [m3/hr] (Limit:0.00-3000.00)Status [Flow - Measured value]Temperature - Measured value [C] (Limit:0.00-200.00)Status [Temperature - Measured value]24-12-24 17:35Ok 0x000060.11Ok 0x0000.0000.0000.000015.41Ok 0x0000.0000.0000.00006.23Ok 0x0000.0000.0000.00007.42Ok 0x0000.0000.0000.00001.92Ok 0x0000.0000.0000.0000892.71Ok 0x0000.0000.0000.00000.41Ok 0x0000.0000.0000.000020.06Ok 0x0000.0000.0000.0000
<%@ Page Language="C#" AutoEventWireup="true" Codefile="eqms.aspx.cs" Inherits="ReadTxtFile.eqms" %>
<meta http-equiv="refresh" content="3">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
</head>
<body >
<form id="form1" runat="server">
<h4 style="width: 366px; text-align: center">CEMS Generation Data : <asp:Label ID="label1" runat="server" Text="Label"></asp:Label></h4>
<asp:GridView runat="server" ID="gridView1" CssClass="auto-style1" Height="69px" Width="30px" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3">
<FooterStyle BackColor="White" ForeColor="#000066" />
<HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
<RowStyle ForeColor="#000066" />
<SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#F1F1F1" />
<SortedAscendingHeaderStyle BackColor="#007DBB" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#00547E" />
</asp:GridView>
</form>
</body>
</html>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.IO;
using System.Drawing;
using System.Net;
using System.Collections;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
namespace ReadTxtFile
{
public partial class eqms : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
label1.Text = "Date:" + DateTime.Now.ToString();
DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[]
{
new DataColumn("Parameters"),
new DataColumn("CO2"),
new DataColumn("NO"),
new DataColumn("SO2"),
new DataColumn("CO"),
new DataColumn("PM"),
new DataColumn("Flow")
});
dt.Rows.Add( "%", "mg/Nm3", "mg/Nm3", "ppm", "mg/Nm3", "m/s");
string stack1 = (new WebClient()).DownloadString("file://10.10.148.9/ftp/MUNPL_241224_173041_par.csv");
string[] splitParams = new[] { "CO2", "NO", "SO2", "CO", "PM", "FLOW" };
string[] values = stack1.Split(splitParams, StringSplitOptions.RemoveEmptyEntries);
dt.Rows.Add("", values[0], values[1], values[2]);
gridView1.DataSource = dt;
gridView1.DataBind();
GridViewRow g1 = gridView1.Rows[1];
}
}
}