添加MS Excel功能 [英] adding MS Excel function

查看:99
本文介绍了添加MS Excel功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在VB6编程中使用Excel的功能,例如Ceiling(),Floor()等.要创建任何类?

How can i use Ms Excel functions like Ceiling(),Floor() etc in VB6 programming.Or any Class is to be made?

推荐答案

使用Excel对象模型中的Application.WorksheetFunction访问Excel工作表函数:

You can access Excel worksheet functions using Application.WorksheetFunction from Excel object model:

Set objExcel = CreateObject("Excel.Application")
MsgBox objExcel.WorksheetFunction.Ceiling(2.5, 1)
objExcel.Quit



这相对较慢,因为您需要在使用函数之前先创建一个Excel实例.



This is relatively slow because you need to create an Excel instance before using the functions.


这篇关于添加MS Excel功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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