Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/263.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我在哪里可以找到从c#代码导出的数据进行统计_C#_.net_Xml_Excel - Fatal编程技术网

我在哪里可以找到从c#代码导出的数据进行统计

我在哪里可以找到从c#代码导出的数据进行统计,c#,.net,xml,excel,C#,.net,Xml,Excel,我正在开发一个工具,通过将excel转换为tally xml格式,将数据从excel导出到tally,它通过localhost导出到tally,但我不知道数据导出到哪里 下面的代码显示了它如何转换和发送下面的代码来调用函数 private void button1_Click(object sender, EventArgs e) { string excelfileName = tbXmlView.Text; DataSet TallyCollectionDat

我正在开发一个工具,通过将excel转换为tally xml格式,将数据从excel导出到tally,它通过localhost导出到tally,但我不知道数据导出到哪里

下面的代码显示了它如何转换和发送下面的代码来调用函数

private void button1_Click(object sender, EventArgs e)
{
        string excelfileName = tbXmlView.Text;
        DataSet TallyCollectionDataSet = TallyTest.ConnectToTally(excelfileName);
        MessageBox.Show("finished" + excelfileName);
}
此代码称为

public static DataSet ConnectToTally( string request)
{
        RequestXML = request;
        TallyRequest = WebRequest.Create("http://localhost:9000/");
        ((HttpWebRequest)TallyRequest).UserAgent = ".NET Framework Example Client";
        // Set the Method property of the request to POST.
        TallyRequest.Method = "POST";
        // Create POST data and convert it to a byte array.
        string postData = RequestXML;
        byte[] byteArray = Encoding.UTF8.GetBytes(postData);
        // Set the ContentType property of the WebRequest.
        TallyRequest.ContentType = "application/x-www-form-urlencoded";
        // Set the ContentLength property of the WebRequest.
        TallyRequest.ContentLength = byteArray.Length;
        // Get the request stream.
        Stream dataStream = TallyRequest.GetRequestStream();
        // Write the data to the request stream.
        dataStream.Write(byteArray, 0, byteArray.Length);
        // Close the Stream object.
        dataStream.Close();
        // Get the response.
        WebResponse response = TallyRequest.GetResponse();
        // Display the status.
        string Response = (((HttpWebResponse)response).StatusDescription).ToString();
        // Get the stream containing content returned by the server.
        dataStream = response.GetResponseStream();
        // Open the stream using a StreamReader for easy access.
        StreamReader reader = new StreamReader(dataStream);

        // Read the content.
        string responseFromTallyServer = reader.ReadToEnd().ToString();

        // Display the content.
        string ResponseFromtally=responseFromTallyServer.ToString();

        DataSet TallyResponseDataSet = new DataSet();
        TallyResponseDataSet.ReadXml(new StringReader(responseFromTallyServer));

        // Clean up the streams.
        reader.Close();
        dataStream.Close();
        response.Close();
        byteArray = null;
        response = null;
        responseFromTallyServer = null;
        Response = null;
        dataStream = null;
        RequestClient.open("Get", "http://localhost:9000/", false, null, null);

        IXMLDOMNode ResponseXml = (IXMLDOMNode)RequestClient.responseXML;
        RequestClient.send("helloworld");
        Console.WriteLine(RequestClient.responseText);
        return TallyResponseDataSet;
    }

Totalylazy标记是一个Java库,而不是我认为你的意思!这是我需要在数据传输后登记理货