• 大小: 0.38M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2020-12-26
  • 语言: C#
  • 标签: Xml  转换  文件  csv  c  

资源简介

实现数据格式转换,对xml数据文件进行解析,把数据保存到csv文件里。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.xml;
using System.Data.OleDb;

namespace xmlToCsv_Taipei_Card_
{
    public partial class Form1 : Form
    {
        System.Data.DataTable resultTable;
        List fieldName;
        public Form1()
        {
            InitializeComponent();
            textBox1.Text = System.Windows.Forms.Application.StartupPath;
            ReadBatch();
        }

        private void ReadBatch()
        {
            if(Directory.Exists(textBox1.Text.Trim()))
            {
                listBox1.Items.Clear();
                DirectoryInfo dir=new DirectoryInfo (textBox1.

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件    1093632  2009-04-10 10:55  xmlToCsv\xmlToCsv\bin\Debug\Interop.Excel.dll

     文件     294912  2010-04-01 16:48  xmlToCsv\xmlToCsv\bin\Debug\MySql.Data.dll

     文件       7406  2011-02-23 10:39  xmlToCsv\xmlToCsv\Form1.cs

     文件       3167  2011-02-22 22:37  xmlToCsv\xmlToCsv\Form1.Designer.cs

     文件       5814  2011-02-22 22:37  xmlToCsv\xmlToCsv\Form1.resx

     文件     294912  2010-04-01 16:48  xmlToCsv\xmlToCsv\MySql.Data.dll

     文件        842  2011-02-23 10:45  xmlToCsv\xmlToCsv\obj\Debug\xmlToCsv(Taipei Card).csproj.GenerateResource.Cache

     文件      28672  2011-02-23 10:45  xmlToCsv\xmlToCsv\obj\Debug\xmlToCsv(Taipei Card).exe

     文件      36352  2011-02-23 10:45  xmlToCsv\xmlToCsv\obj\Debug\xmlToCsv(Taipei Card).pdb

     文件        180  2011-02-23 10:45  xmlToCsv\xmlToCsv\obj\Debug\xmlToCsv_Taipei_Card_.Form1.resources

     文件        180  2011-02-23 10:45  xmlToCsv\xmlToCsv\obj\Debug\xmlToCsv_Taipei_Card_.Properties.Resources.resources

     文件       1004  2011-02-23 10:45  xmlToCsv\xmlToCsv\obj\xmlToCsv(Taipei Card).csproj.FileListAbsolute.txt

     文件        480  2011-02-22 20:46  xmlToCsv\xmlToCsv\Program.cs

     文件       1190  2011-02-22 20:46  xmlToCsv\xmlToCsv\Properties\AssemblyInfo.cs

     文件       2898  2011-02-22 20:46  xmlToCsv\xmlToCsv\Properties\Resources.Designer.cs

     文件       5612  2011-02-22 20:46  xmlToCsv\xmlToCsv\Properties\Resources.resx

     文件       1106  2011-02-22 20:46  xmlToCsv\xmlToCsv\Properties\Settings.Designer.cs

     文件        249  2011-02-22 20:46  xmlToCsv\xmlToCsv\Properties\Settings.settings

     文件       7188  2011-02-23 10:45  xmlToCsv\xmlToCsv\SqlHelper.cs

     文件       3537  2011-02-23 10:44  xmlToCsv\xmlToCsv\xmlToCsv.csproj

    ..A..H.     14848  2011-02-23 18:20  xmlToCsv\xmlToCsv(Taipei Card).suo

     文件        952  2011-02-22 20:46  xmlToCsv\xmlToCsv.sln

     目录          0  2014-09-04 20:02  xmlToCsv\xmlToCsv\bin\Debug\TestBatch

     目录          0  2011-02-22 20:46  xmlToCsv\xmlToCsv\obj\Debug\TempPE

     目录          0  2014-09-04 20:02  xmlToCsv\xmlToCsv\bin\Debug

     目录          0  2014-09-04 20:01  xmlToCsv\xmlToCsv\obj\Debug

     目录          0  2014-09-04 20:01  xmlToCsv\xmlToCsv\bin

     目录          0  2014-09-04 20:01  xmlToCsv\xmlToCsv\obj

     目录          0  2014-09-04 20:01  xmlToCsv\xmlToCsv\Properties

     目录          0  2014-09-04 20:01  xmlToCsv\xmlToCsv

............此处省略4个文件信息

评论

共有 条评论