Excelのアップロードに次のコードを使用しています
OleDbConnection sSourceConnection;
string properties = "Excel 8.0; HDR=NO; IMEX=1;";//properties set for connection to excel
string sSourceConstr = @"Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" + filePath + ";Extended Properties=\"" + properties + "\"";
sSourceConnection = new OleDbConnection(sSourceConstr);//creating the OLEDB connection
try
{
//select statement to select data from the first excel sheet
string sql = string.Format("Select * FROM [{0}]", "Sheet1$");
//commands to fill the dataset with excel data
OleDbDataAdapter excelAdapter = new OleDbDataAdapter();
OleDbCommand command = new OleDbCommand(sql, sSourceConnection);
sSourceConnection.Open();
excelAdapter.SelectCommand = command;
excelAdapter.Fill(dSet, EXCEL_DATA);
約 300 件のレコードをアップロードする必要があります。1 つの列にいくつかのテキスト コメントがあります。コメントの長さは、10 文字から 1000 文字までさまざまです。ただし、長さが 255 を超えるコメントはすべて、その列で切り捨てられています。
この投稿Excel cell-values are truncated by OLEDB-providerを使用してレジストリ設定を変更しましたが、機能しませんでした。
また、投稿OleDB & mixed Excel datatypes : missing dataで言及されているすべてを試しましたが、まだ何も機能しません。