0

I have the following code:

private DataSet GetDataSet(string tableName)
{
    DbCommand cmd = GetConnection().CreateCommand();
    cmd.CommandText = "SELECT data FROM " + tableName;
    DbDataAdapter da = GetDataAdapter();
    da.SelectCommand = cmd;
    DataSet ds = new DataSet();
    da.Fill(ds, "query");

    DataTable dt = ds.Tables["query"];

    foreach (DataRow row in dt.Rows)
    {
        foreach (DataColumn col in dt.Columns)
        {
            Console.WriteLine(row[col]);
        }
    }

    return ds;
}

is it possible to read url link from excel file?

I have in excel link like:

PARK

but when i read from excel i see onl word PARK and no link.

/Regards

4

1 回答 1

0

OleDB 只能读取单元格中的原始数据。

如果您想阅读格式(包括超链接),您需要使用 COM Interop 来自动化 Excel 或购买第三方 Excel 库。

于 2010-02-19T19:21:04.297 回答