<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can't open CSV File in 10.7 in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/can-t-open-csv-file-in-10-7/m-p/537426#M14559</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This has now been resolved. Thanks everyone for your input!! It is greatly appreciated!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Jan 2020 16:52:23 GMT</pubDate>
    <dc:creator>ElizabethWare1</dc:creator>
    <dc:date>2020-01-13T16:52:23Z</dc:date>
    <item>
      <title>Can't open CSV File in 10.7</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/can-t-open-csv-file-in-10-7/m-p/537421#M14554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to open a CSV file in with the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Create pTable from .csv file...&lt;BR /&gt; IWorkspaceFactory pFact = new TextFileWorkspaceFactory();&lt;BR /&gt; IWorkspace pWorkspace = pFact.OpenFromFile(LocalFolder, 0);&lt;/P&gt;&lt;P&gt;IFeatureWorkspace pFeatws = (IFeatureWorkspace)pWorkspace;&lt;BR /&gt; ITable pTable = pFeatws.OpenTable(CSVFile); //open the .csv file...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is throwing me an error. I have opened the csv in ArcMap and it loads fine. I have tried to do the&amp;nbsp;Tyep.GetTypeFromProgID as well and both throw the same error. This is a high priority and have very limited time to get this working. Please someone help me figure this out. The CSVFile does include the file extension as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;URGENT!! URGENT!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Nov 2019 19:07:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/can-t-open-csv-file-in-10-7/m-p/537421#M14554</guid>
      <dc:creator>ElizabethWare1</dc:creator>
      <dc:date>2019-11-23T19:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Can't open CSV File in 10.7</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/can-t-open-csv-file-in-10-7/m-p/537422#M14555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also want to mention, this worked in 9.3!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Nov 2019 19:08:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/can-t-open-csv-file-in-10-7/m-p/537422#M14555</guid>
      <dc:creator>ElizabethWare1</dc:creator>
      <dc:date>2019-11-23T19:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: Can't open CSV File in 10.7</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/can-t-open-csv-file-in-10-7/m-p/537423#M14556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Elizabeth,&lt;/P&gt;&lt;P&gt;At first check what you have in your pWorkspace. Add code using:&lt;/P&gt;&lt;P&gt;public IEnumDataset get_Datasets (&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; esriDatasetType DatasetType&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;parameter esriDTTable.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Using Next() from IEnumDataset check all datasets in your workspace. If you find your CSVFile dataset, you can cast it to ITable. Otherwise your csv does not exist or it is wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2019 08:22:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/can-t-open-csv-file-in-10-7/m-p/537423#M14556</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2019-11-26T08:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Can't open CSV File in 10.7</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/can-t-open-csv-file-in-10-7/m-p/537424#M14557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/267057"&gt;Gintautas Kmieliauskas&lt;/A&gt;‌&amp;nbsp;I did figure out what was causing my CSV open issue. I was sending the whole path instead of just the file name. I am able to open my csv now, but having issues creating the feature class. This is what I have from 9.3 but it fails when trying to create the Feature Class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ShapefileWorkspaceFactory pWorkspaceFactory = new ShapefileWorkspaceFactory();&lt;/P&gt;&lt;P&gt;IFeatureWorkspace pFeatureWorkspace = (IFeatureWorkspace)pWorkspaceFactory.OpenFromFile(LocalFolder, 0);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; IFields pMatchFields = geocoder.MatchFields; // Fields from Locator&lt;BR /&gt; IFieldsEdit pTableFieldsEdit = (IFieldsEdit)pTable.Fields; // Fields from ActiveCalls.csv&lt;BR /&gt; IFieldsEdit pOutputFields = (IFieldsEdit)new Fields();&lt;BR /&gt; IFields pTableFields = pTableFieldsEdit;&lt;BR /&gt; pOutputFields.FieldCount_2 = pTableFields.FieldCount + pMatchFields.FieldCount + 1;&lt;/P&gt;&lt;P&gt;IFieldEdit pFieldEdit = (IFieldEdit)new Field();&lt;BR /&gt; pFieldEdit.Type_2 = esriFieldType.esriFieldTypeOID;&lt;BR /&gt; pFieldEdit.Name_2 = "FID";&lt;BR /&gt; &lt;BR /&gt; // Add FID Field&lt;BR /&gt; pOutputFields.set_Field(0, pFieldEdit);&lt;/P&gt;&lt;P&gt;// add the fields from the .csv table&lt;BR /&gt; for (int i = 1; i &amp;lt;= pTableFields.FieldCount; i++)&lt;BR /&gt; pOutputFields.set_Field((i), pTableFields.get_Field(i - 1));&lt;/P&gt;&lt;P&gt;// add the match fields From Locator&lt;BR /&gt; for (int i = (1 + pTableFields.FieldCount); i &amp;lt;= (pMatchFields.FieldCount + pTableFields.FieldCount); i++)&lt;BR /&gt; {&lt;BR /&gt; pOutputFields.set_Field(i, pMatchFields.get_Field(i - pTableFields.FieldCount - 1));&lt;/P&gt;&lt;P&gt;pFeatureClass = pFeatureWorkspace.CreateFeatureClass(ShapeFileName, validatedFields, null, null, esriFeatureType.esriFTSimple, "Shape", "");&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2019 18:13:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/can-t-open-csv-file-in-10-7/m-p/537424#M14557</guid>
      <dc:creator>ElizabethWare1</dc:creator>
      <dc:date>2019-11-26T18:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: Can't open CSV File in 10.7</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/can-t-open-csv-file-in-10-7/m-p/537425#M14558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's not possible for anyone to provide an answer as you are not showing the full code, what are the variables&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;EM&gt;ShapeFileName&lt;/EM&gt; and &lt;EM&gt;validatedFields&lt;/EM&gt; set to?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2020 16:31:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/can-t-open-csv-file-in-10-7/m-p/537425#M14558</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2020-01-13T16:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: Can't open CSV File in 10.7</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/can-t-open-csv-file-in-10-7/m-p/537426#M14559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This has now been resolved. Thanks everyone for your input!! It is greatly appreciated!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2020 16:52:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/can-t-open-csv-file-in-10-7/m-p/537426#M14559</guid>
      <dc:creator>ElizabethWare1</dc:creator>
      <dc:date>2020-01-13T16:52:23Z</dc:date>
    </item>
  </channel>
</rss>

