資源簡介
實現數據格式轉換,對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??xm
?????文件?????294912??2010-04-01?16:48??xm
?????文件???????7406??2011-02-23?10:39??xm
?????文件???????3167??2011-02-22?22:37??xm
?????文件???????5814??2011-02-22?22:37??xm
?????文件?????294912??2010-04-01?16:48??xm
?????文件????????842??2011-02-23?10:45??xm
?????文件??????28672??2011-02-23?10:45??xm
?????文件??????36352??2011-02-23?10:45??xm
?????文件????????180??2011-02-23?10:45??xm
?????文件????????180??2011-02-23?10:45??xm
?????文件???????1004??2011-02-23?10:45??xm
?????文件????????480??2011-02-22?20:46??xm
?????文件???????1190??2011-02-22?20:46??xm
?????文件???????2898??2011-02-22?20:46??xm
?????文件???????5612??2011-02-22?20:46??xm
?????文件???????1106??2011-02-22?20:46??xm
?????文件????????249??2011-02-22?20:46??xm
?????文件???????7188??2011-02-23?10:45??xm
?????文件???????3537??2011-02-23?10:44??xm
????..A..H.?????14848??2011-02-23?18:20??xm
?????文件????????952??2011-02-22?20:46??xm
?????目錄??????????0??2014-09-04?20:02??xm
?????目錄??????????0??2011-02-22?20:46??xm
?????目錄??????????0??2014-09-04?20:02??xm
?????目錄??????????0??2014-09-04?20:01??xm
?????目錄??????????0??2014-09-04?20:01??xm
?????目錄??????????0??2014-09-04?20:01??xm
?????目錄??????????0??2014-09-04?20:01??xm
?????目錄??????????0??2014-09-04?20:01??xm
............此處省略4個文件信息
- 上一篇:winfrom分頁
- 下一篇:Winform仿360安全衛士界面風格.rar
評論
共有 條評論