China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-02 08:01
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [WSH] View Excel Files Without Installing Office View 1,624 Replies 5
Original Poster Posted 2006-08-27 15:38 ·  中国 四川 成都 电信
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Hehe, saw it on MS newsgroup. Although we all know how to use ADO when learning it normally, it's still difficult to recall it in critical moments. Can you think of ADO without using Excel.Application?

Sample code


Dim oADO, oRS, sSQL, sConn
sConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Ray\SomeExcelFile.xls;Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"""
sSQL = "SELECT this, that FROM "
Set oADO = CreateObject("ADODB.Connection")
oADO.Open sConn
Set oRS = oADO.Execute(sSQL)
If Not oRS.EOF Then WScript.Echo oRS.GetString(2,,",",vbCRLF,"")
oRS.Close : Set oRS = Nothing
oADO.Close : Set oADO = Nothing



[ Last edited by electronixtar on 2006-8-27 at 15:41 ]
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
redtek +2 2006-10-25 01:52

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 2 Posted 2006-08-29 00:18 ·  中国 辽宁 朝阳 联通
铂金会员
★★★★
痴迷DOS者
Credits 5,798
Posts 1,924
Joined 2003-06-20 00:00
23-year member
UID 5583
Gender Male
From 金獅電腦軟體工作室
Status Offline
Hehe. Actually, there are many similar codes on MSDN for everyone to learn.
熟能生巧,巧能生精,一艺不精,终生无成,精亦求精,始有所成,臻于完美,永无止境!
金狮電腦軟體工作室愿竭诚为您服务!
QQ群:8393170(定期清理不发言者)
个人网站:http://www.520269.cn
电子邮件:doujiehui@vip.qq.com
微信公众号: doujiehui
Floor 3 Posted 2006-10-25 00:44 ·  中国 上海 徐汇区 电信
初级用户
Credits 42
Posts 20
Joined 2006-10-24 22:47
19-year member
UID 68095
Gender Male
Status Offline
Unfortunately, there are not many applications that solve practical problems.
Floor 4 Posted 2006-10-25 04:40 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Sweat~~Still can't solve the problem? A script of a few bytes can avoid the installation of hundreds of megabytes of programs.

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 5 Posted 2006-10-26 03:29 ·  中国 广东 东莞 电信
中级用户
★★
Credits 387
Posts 104
Joined 2004-11-19 00:00
21-year member
UID 33813
Gender Male
Status Offline
There are dedicated programs for viewing Excel, which are not hundreds of megabytes but around ten megabytes.
Floor 6 Posted 2006-10-26 03:36 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Mine is only a few kilobytes. With a little modification, it can modify Excel content.

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Forum Jump: