当前位置:主页 > 平面设计 > 感兴趣

感兴趣

Excel Services代码示例
Excel Services代码示例

译者:玫瑰云 来源:发表于:2006年7月7日Excel Services coding exampleExcel Services代码示例For those of you interested in programming Excel Services, check out this blog(链接).如果你对Excel Services感兴趣,请查看此博客(链接)的内容。One of the developers (Shahar) working on Excel Services team has posted an article that walks through the details of programmatically working with a workbook using Excel Services. There are both C# and VB.NET samples available. I think Shahar plans to cover a range of topics over the coming months, so if you are interested, keep watching his site.服务于Excel Services开发团队的shahar曾经发表过一篇文章,详细列举了如何使用Excel Services处理一个工作簿的步骤, 里面有C#和VB.NET的一些实例。我想shahar计划在近几个月内讨论这些主题,如果你对此感兴趣,敬请关注他的网站。

158 次浏览
Excel数字排列组合公式写法介绍
Excel数字排列组合公式写法介绍

文章通过一个实例来介绍数字排列组合公式的写法,感兴趣的朋友对排列组合公式稍微变通实现类似的需求。  需要排列组合公式的,多是对数字感兴趣的朋友,喜欢对数字排列组合。  本文介绍通过excel中编写VBA代码,掌握一些规律和算法来写排列组合公式。  数字排列组合公式的思路,可以这样理解:从n个不同元素中,任取m(m≤n)个元素按照一定的顺序排成一列。  下面通过一个实例来讲解如何通过排列组合公式完成数字排列组合。  比如从"9876543"中任意取5个数来进行排列组合,方法是:  新建一个工作表,按ALT+F11,打开VBE编辑器,插入——模块,在右边代码编辑框复制下面的代码,然后单击工具栏的“运行”命令,然后切换到工作表中,可以看见A列已经根据排列组合公式自动生成了所需要的所有数字排列组合。 Sub 排列组合公式()Dim II%, I%, J%, K%, L%, M%Dim Srt1$, Srt2$, Srt3$, Srt4$, Srt5$Dim TStr1$, TStr2$, TStr3$, TStr4$Dim t, arr()Const FullStr = "9876543"t = TimerII = 0For I = 1 To 7Srt1 = Mid(FullStr, I, 1)TStr1 = Replace(FullStr, Srt1, "")For J = 1 To 6Srt2 = Mid(TStr1, J, 1)TStr2 = Replace(TStr1, Srt2, "")For K = 1 To 5Srt3 = Mid(TStr2, K, 1)TStr3 = Replace(TStr2, Srt3, "")For L = 1 To 4Srt4 = Mid(TStr3, L, 1)TStr4 = Replace(TStr3, Srt4, "")For M = 1 To 3Srt5 = Mid(TStr3, M, 1)II = II + 1ReDim Preserve arr(1 To II)arr(II) = Srt1 & Srt2 & Srt3 & Srt4 & Srt5NextNextNextNextNextRange("A1:A" & II) = Application.Transpose(arr)End Sub

786 次浏览