您可以在C#中创建Excel的PivotTableWizard吗? [英] Can You Create Excel's PivotTableWizard in C#?

查看:66
本文介绍了您可以在C#中创建Excel的PivotTableWizard吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想在Excel中复制PivotTableWizard的功能.我的用户希望能够从我们网页上的列表框中选择项目,然后拖动"他们到一个???(GridView,???-我有另一个问题)来设置他们的工作表/网格.他们希望能够拖动列表框项目并将其设置为行或将其设置为列.基本上,用户将我带到Excel并突出显示了一些单元格,然后单击数据透视表向导".然后,她将所需的值拖到左侧区域,并根据需要设置表格.在.NET中使用某些插件可以做到这一点吗?我看到了一些数据透视表的VBA代码,但我不知道他们想要/如何/在何处/想要什么字段或项目.我想这可以在列表框的点击事件上完成(选择项目等),但是怎么做呢?如果我可以将其拖到-我将其拖到什么位置?

我可以在gridview中执行此操作吗?它需要一个数据源,对不对?它不能只是一个大的空盒子,我可以按自己的意愿拖放列和行,对吗?请证明我错了或向正确的方向指出!希望我有道理!非常感谢!

Hi,
 
I want to replicate the functionality of the PivotTableWizard in Excel. My users want to be able to select items from a listbox on our webpage and then "drag" them to a ???(GridView, ??? - another question I have) to set up their worksheet/grid. They want to be able to drag a listbox item and make it a row or could make it a column. Basically, the user took me to Excel and highlighted some cells, then clicked the PivotTable Wizard. She then dragged the values wherever she wanted to the left area and set up her table how she wanted. Is this possible in .NET with some addin? I saw some VBA code for PivotTable, but I won't know how/where/what fields or items they want. I guess it could be done on a click event for the listbox (pick the item, etc.) but how??? If I can drag it over - what do I drag it to?

Can I do this with a gridview? It needs a datasource, right? It cant just be a big empty box that I can drag and drop columns and rows as I see fit, right? Please prove me wrong or point me in the right direction! Hopefully, I made some sense! Thanks so much!

推荐答案

MSDN 论坛首页> Visual C#> Visual C#General 位于此处: http: //social.msdn.microsoft.com/Forums/zh-CN/csharpgeneral/threads/.

Thank you for your post!  I would suggest posting your question in one of the MSDN > Forums Home > Visual C# > Visual C# General located here:  http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/threads/.


这篇关于您可以在C#中创建Excel的PivotTableWizard吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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