🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.lang.visual-basic
Article #20657

�ر�excel�������

#20657
From: �Ǵ�
Date: Sun, 10 Aug 2003 06:27
43 lines
2665 bytes
��vbд��ݵ�excel���

 ��д��Excel��ݣ��ر��˳���
����������еĻ�����ʾ��excel�Ľ��

�ո�д��excel�ļ�Ҳ�Ǵ򲻿�����ô�죬л��

���õ��Ǿ�����Ľ���vbдExcel�ķ�����

'����excel�ļ�
Dim zsbexcel, newbook
Set zsbexcel = New excel.Application'����һ����excel�Ķ���
 Set newbook = Workbooks.Add'���һ��������
  Application.SheetsInNewWorkbook = 1'�趨�?��
   With zsbexcel.ActiveSheet'�Լ���ı?����
        .Cells(1, 1).Value = "����"
        .Cells(1, 2).Value = "�Ƿ���ɶ���"
        .Cells(1, 3).Value = "���"
        .Cells(1, 4).Value = "ʵ����ɵ�����"
    End With
'�����cells(n,n)����excel���Ӧ���ı�������
newbook.SaveAs FileName:=gongzipath'gongzipath���DZ����excel�ļ���·��
'gongzipath="c:\a.xls"


zsbexcel.DisplayAlerts = False'����excelΪ����ʾ
'�����ҿ��Գ���һ����Ϊtrue����
    zsbexcel.Quit       '�˳�EXCEL
    zsbexcel.DisplayAlerts = True
excel��ʹ��
Workbooks.Open gongzipath'��ָ����excel�ļ�
zsbexcel.ActiveSheet.Cells(i + 2, 1).Value = workername(i)
'��excel��ָ��λ�������ֵ
a=zsbexcel.ActiveSheet.Cells(i + 2, 1).Value
'��excel������
ActiveWorkbook.Save
 zsbexcel.DisplayAlerts = False
    zsbexcel.Quit       '�˳�EXCEL
    zsbexcel.DisplayAlerts = True

--

�� ��Դ:��BBS ˮľ�廪վ smth.org��[FROM: 218.108.41.246]
Technical Details
Message-ID: <000000$3v2@smth.org>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-08!supernews.com!newsswitch.lcs.mit.edu!logbridge.uoregon.edu!newshub.sdsu.edu!cyclone.bc.net!sjc70.webusenet.com!news.webusenet.com!maily.cic.tsinghua.edu.cn!SMTH

Show Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB
X-Google-Thread: 10a1a8,e087156368cec77e,start
X-Google-Attributes: gid10a1a8,public
X-Google-Thread: 109fdd,e087156368cec77e,start
X-Google-Attributes: gid109fdd,public
X-Google-ArrivalTime: 2003-08-09 23:30:18 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-08!supernews.com!newsswitch.lcs.mit.edu!logbridge.uoregon.edu!newshub.sdsu.edu!cyclone.bc.net!sjc70.webusenet.com!news.webusenet.com!maily.cic.tsinghua.edu.cn!SMTH
From: GatesBill@smth.org (�Ǵ�)
Newsgroups: cn.bbs.comp.lang.visual-basic
Subject: �ر�excel�������
Date: 10 Aug 2003 06:27:04 GMT
Organization: BBS ˮľ�廪վ
Message-ID: <000000$3v2@smth.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: VisualBasic/o/M.1060496757.60
Lines: 43