私はこのトピックが死ぬまで行われていることを知っていますが、私は終わりに近づいています。
csvを解析する必要があります。これはかなり平均的なCSVであり、解析ロジックは、休暇に行く前に機能することを誓った別の開発者によってOleDBを使用して記述されています:)
CSV sample:
Dispatch Date,Master Tape,Master Time Code,Material ID,Channel,Title,Version,Duration,Language,Producer,Edit Date,Packaging,1 st TX,Last TX,Usage,S&P Rating,Comments,Replace,Event TX Date,Alternate Title
,a,b,c,d,e,f,g,h,,i,,j,k,,l,m,,n,
私が抱えている問題は、試した接続文字列に応じてさまざまなエラーが発生することです。
接続文字列を試すと:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source="D:\TEST.csv\";Extended Properties="text;HDR=No;FMT=Delimited"
エラーが発生します:
'D:\TEST.csv' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
接続文字列を試すと:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\TEST.csv;Extended Properties=Excel 12.0;
または接続文字列
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\TEST.csv;Extended Properties=Excel 8.0;
エラーが発生します:
External table is not in the expected format.
私はすべてのコードを捨てて、最初から始めることを考えています。私が間違っていることは明らかですか?