台灣最大程式設計社群網站
線上人數
1399
 
會員總數:246209
討論主題:189782
歡迎您免費加入會員
討論區列表 >> VB.NET >> VB.NET 從 DataGridView 轉換成txt檔 用逗號分隔
[]  
[我要回覆]
1
回應主題 加入我的關注話題 檢舉此篇討論 將提問者加入個人黑名單
VB.NET 從 DataGridView 轉換成txt檔 用逗號分隔
價值 : 50 QP  點閱數:612 回應數:2
樓主

SU
門外漢
0 6
174 32
發送站內信


請問各位大大我監控Datagridview的資料轉換txt檔用逗號分隔但是要如何讓最後一行的文字不要有逗號要怎麼做

例如:在txt檔裡面的內容
$GPRMC,083600.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,083900.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,084200.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,084500.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,084800.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,085100.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,085400.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,085700.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,090000.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,090300.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,090600.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,090900.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,091200.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,091500.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,091800.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,092100.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,092400.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,092700.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,093000.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,093300.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,093600.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,093900.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,094200.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,094500.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,094800.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,095100.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,095400.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,095700.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,100000.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,100300.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,100600.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,100900.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,101200.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,101500.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,101800.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,102100.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,102400.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,
$GPRMC,102700.00,A,2243.64281,N,12015.23642,E,,,120317,,,A,


但是想要變成這樣 最後一個字不要有逗號
$GPRMC,083600.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,083900.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,084200.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,084500.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,084800.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,085100.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,085400.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,085700.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,090000.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,090300.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,090600.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,090900.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,091200.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,091500.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,091800.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,092100.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,092400.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,092700.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,093000.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,093300.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,093600.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,093900.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,094200.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,094500.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,094800.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,095100.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,095400.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,095700.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,100000.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,100300.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,100600.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,100900.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,101200.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,101500.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,101800.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,102100.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,102400.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
$GPRMC,102700.00,A,2243.64281,N,12015.23642,E,,,120317,,,A
請問各位大大程式要怎麼改寫感謝

搜尋相關Tags的文章: [ DataGridView ] , [ txt ] ,
本篇文章發表於2018-11-20 11:10
1樓
最有價值解答

小魚
檢舉此回應

本篇文章回覆於2018-11-20 12:34
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔--
2樓
作者回應

SU
檢舉此回應
感謝大大
本篇文章回覆於2018-11-20 13:36
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔--
   
1

回覆
如要回應,請先登入.