Hi folks,I am wondering what type of exporter should I use to export tables (as standalonetable) to get file.txt There is a lot of exporter to export into jpeg, tiff etc... and there is a possibility to select txt format in the Exportdialog. Unfortunately I do not find any solution to write a macro with VB to create a txt file of the attribute table ...Cheersand thank youL.
Dim CSVFile As System.IO.StreamWriter CSVFile = New System.IO.StreamWriter("C:\FileNameToCreate.txt") Dim sb As New System.Text.StringBuilder sb = New System.Text.StringBuilder CSVFile.WriteLine("Field1, Field2, Field3, Field4, Field5") Using CSVFile For Each r As DataRow In theADONetDataSet.Tables(0).Rows sb = New System.Text.StringBuilder sb.Append((r("Field1")) & "," _ & (r("Field2")) & "," _ & (r("Field3") & "," _ & (r("Field4")) & "," _ & (r("Field5")))) CSVFile.WriteLine(sb.ToString) Next End Using
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.