开发者

OleDbAdapter reading column data

I have created a function to read an excel sheet using OLEDb. I can make the connection and read the excel sheet.

With DbDataReader a开发者_JAVA技巧nd a while loop using Read() method I retrieved all cell data from an excel sheet.

I want to check the alignment info of each cell. If a cell is left-aligned, I will pick data from those left-aligned cells.

How can I do that?

Sorry It is a stupid question but I really need it.

Thanks


You can't do that with Excel OleDb provider; cell alignment isn't exposed. The OleDb provider makes the Excel spreadsheet mimic a database table and database columns don't have alignment.

You'll have to use Excel interop if you need to that. See this question for help on that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜