合并数据集中的单元格Excel问题 [英] Merge cell excel problem in dataset

查看:96
本文介绍了合并数据集中的单元格Excel问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 2008创建Windows窗体应用程序.
我正在像这样阅读excel

I am creating a Windows Forms Application using Visual Studio 2008.
I am reading excel like this

string strQuery = "Select * from [{0}]";
                       OleDbCommand cmd = new OleDbCommand(string.Format(strQuery, strSheetName));
                       cmd.Connection = connection;
                       OleDbDataAdapter adapter = new OleDbDataAdapter(cmd);
                       adapter.Fill(dataSet, (string)strSheetName);



但是合并单元格未显示数据.像cell [5,4]具有"x",并且在这种情况下与cell [6,4]合并,因此cell [6,4]为空白,我希望重复数据.任何人都遇到了这个问题,请帮忙.



But merge cells are not showing the data. like cell[5,4] has "x" and which is merged with cell[6,4] in this condition cell[6,4] is blank where i want the data to be repeated. anyone got this problem please help.

推荐答案

从技术上讲,这没错.

如果合并了cell [5,4] ="x"和cell [6,4] ="x",则即使它们已合并,它们两个仍然都包含"x".

如果合并时cell [6,4]为空,则即使合并后它仍为空白.

我在进行过滤时发现了困难的方法.
Technically, that''s not wrong.

If cell[5,4] = "x" and cell[6,4] = "x" and you merge them, then both of them still contain "x" even though they''re merged.

If cell[6,4] was blank when you merged it, it remains blank even after merging.

I found that out the hard way while I was doing filtering.


这篇关于合并数据集中的单元格Excel问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆