Worksheet 3
第5章 Worksheet(工作表)对象PPT

2020/3/15
6
2.2 使用工作表的编号
工作表编号(索引号)是指工作表在工作簿中的位 置,Excel根据工作表在工作表标签中的位置以1开始 从左向右进行编号。
Worksheets(1).Select 该代码选中并激活当前工作簿中第1个工作表
2020/3/15
7
使用Worksheet对象的Index属性可以返回工 作表的编号:
2020/3/15
18
限制工作表的滚动区域
解决方法是:在thisworkbook中选择事件 “workbook_open” 并对ScrollArea属性进行设置,如下:
Private Sub workbook_open() Sheet3.ScrollArea ="a1:g5" End Sub
工作簿的Open事件,在打开该工作簿时设置Sheet3工作表 的滚动区域为“a1:g5”单元格区域。
2020/3/15
22
Private Sub Worksheet_Activate()
sheet2.Select
End Sub
注意:实际上是在打开sheet1时将活动工作 表转移到sheet2上面。
2020/3/15
23
对指定区域保护
对其中一张工作表的指定区域进行保护方 法: 1,选择其中一张工作表; 2,在事件中选择“SelectionChange” 3,输入以入代码:
第3课 Worksheet(工作表)对象
1
知识点
认识工作表对象 引用工作表对象 对工作表对象进行处理 限制工作表滚动区域 保护工作表
2020/3/15
2
一、Worksheet对象和 Worksheets集合
第5章 Worksheet(工作表)对象PPT

2020/3/15
11
3、使用ActiveSheet属性引用活动工作表
使用ActiveSheet属性可以返回当前活动工作 表
MsgBox
2020/3/15
12
工作表的添加与删除
在工作簿中添加工作表使用Add方法,语法如下
expression.Add(Before, After, Count, Type)
2020/3/15
6
2.2 使用工作表的编号
工作表编号(索引号)是指工作表在工作簿中的位 置,Excel根据工作表在工作表标签中的位置以1开始 从左向右进行编号。
Worksheets(1).Select 该代码选中并激活当前工作簿中第1个工作表
2020/3/15
7
使用Worksheet对象的Index属性可以返回工 作表的编号:
End Sub
2020/3/15
14
三、工作表的添加与删除
3.1、工作表对象的Delete方法删除指定的对象, 语法如下:
expression.Delete
参数expression是必需的,该表达式返回“应用于”列表 中的对象之一 例如:Sheet7.Delete
2020/3/15
15
3.2、工作表中插入行
在工作表的中插入空行,需要使用Insert方法
Sheet1.Rows(3).Insert 在sheet1的第2行和第3行之间插入一行空行
Worksheet对象应用大全(3)-UsedRange属性详解

Worksheet对象应用大全(3)-UsedRange属性详解2009年07月20日, 1:36 下午分享到微博:(3 人投票, 平均: 5.00 out of 5)这是在以前的博客中发表的一篇日志,对其内容稍加整理并补充后,辑录于此,作为VBA应用大全系列的一部分。
关于UsedRange属性的基本概念UsedRange属性应用于Worksheet对象,返回Range对象,代表指定工作表中已使用的区域,即返回工作表中已使用的单元格区域。
因此,该属性也可以用于选取单元格区域。
下面用一个简单的例子来说明UsedRange属性的功能。
如下图1所示的工作表:图1:一个带有数据的工作表然后,在VBE编辑器中输入如下代码:Sub sample01() Worksheets("Sheet1").UsedRange.SelectEnd Sub代码运行后,上面的工作表显示如下图2所示:图2:代码运行后的工作表即在指定工作表中(本例为工作表Sheet1)已使用的范围被全部选中。
可以看出,UsedRange属性返回工作表中所有已使用范围的单元格区域,而不管该区域数据间是否有空行或空格。
UsedRange属性的一些常见用法(1)返回工作表中已使用区域的行数或列数语句edRange.Rows.count返回当前工作表中已使用单元格区域的行数。
同样,语句edRange.Columns.count返回当前工作表中已使用单元格区域的列数。
在上例中,您可以在立即窗口中输入下面语句,将返回相应的值。
edRange.Rows.count20edRange.Columns.count4一般写法为<在此输入引用对象>.UsedRange.Rows.Count和<在此输入引用对象>.UsedRange.Columns.Count。
(2)返回工作表中已使用单元格区域的地址语句edRange.Address 返回当前工作表已使用单元格区域的地址。
Worksheet 3

WORKSHEET3In Part 2 of the test, you talk to your partner. The examiner tells you what to do,but does not ask you questions. You have a page of pictures to help you.■Task OneLook at the page of pictures your teacher will give you. These are the kinds ofpictures you will have to talk about in Part 2 of the Speaking test.In the centre of the page is a picture in a circle. Talk to your partner and discussthe following questions:•Who can you see in the picture in the circle?•What do you think is happening in the picture?■Task T woNow watch the examiner on the DVD giving the instructions for this part and fill in the missing words.Were you right about the picture in the circle?■Task ThreeNow watch the examiner giving the instructions again.What do you have to do in this part of the test? Choose the correct answera), b) or c).1.a)Talk about yourselves.b)Talk about the students in the picture.c)Talk about students in general.2.a)Describe all the other pictures.b)Talk about the place in the most interesting picture.c)Talk about all the places in the pictures and then choose one. Examiner: A teacher wants to take her class out on an ____________________________ _______________ . She has asked the students _______________ they wouldlike to go. Talk together about the different ________________________ theycould go and decide which would be the most ________________________.■Task Four1.Look at all the pictures on the page and tick (✓) the places you can see.2.Work with a partner and discuss the following questions:•Which do you think would be the most interesting place to visit?•Why?。
【英语】Unit3 Fascinating park Using Language—Writing

even on the streeAt.tOtrfacctoiuornsse, Disneyland also has many exciting rides
个地方都有). Disneyland will bring you intthoeammeagical world and
_m__a_k_e_y_o_u_r__c_h_il_d_h_o_o_d__d_r_ea_m__s_c_o_m__e_t_r_u_e_ (让你儿时的梦想成真).
_T_r_a_v_e_ll_in_g_t_h_r_o_u_g_h_s_p_a_c_e (遨游ri太de空s ), _v_i_si_ti_n_g_a__p_ir_a_te__sh_i_p_ (参 观海盗船), or meeting an adorable _f_a_ir_y_t_a_le_o_r_c_a_r_t_o_on__c_h_a_ra_c_t_e_r
你喜欢什么), there is an incredible theme parkt_h_a_t_w_i_l_l _a_p_p_e_a_l_to__y_o_u
(让你流连忘返)!
general introduction of the theme parks
Mind Map of Disneyland
_a_re__fa_m__o_u_s_f_o_r_ ( 因 ... 著 名 ) having the biggest or longest roller
coasters, others for showing ______________________ (著名的影音).
hssfsheet和worksheet

hssfsheet和worksheetHSSFSheet和Worksheet是两种用于处理电子表格的概念。
HSSFSheet 是Apache POI库中的一部分,用于处理Excel文件的高级Java API。
而Worksheet是微软Excel中的一个术语,表示一个电子表格中的单个工作表。
在本篇文章中,我们将逐步回答有关HSSFSheet和Worksheet的问题,了解它们的定义、功能和如何使用它们进行电子表格的操作。
第一部分:HSSFSheet的定义和功能(700字)HSSFSheet是Apache POI库中的一个类,它用于表示Excel文件中的一个工作表。
它提供了一系列方法和属性,用于对工作表进行操作。
以下是HSSFSheet的主要功能:1. 创建和删除工作表:使用HSSFSheet,我们可以创建新的工作表,也可以删除现有的工作表。
例如,我们可以使用createSheet()方法创建一个新的工作表,使用removeSheetAt()方法删除现有的工作表。
2. 获取和设置单元格的值:HSSFSheet提供了一系列的getCell()方法,用于获取特定单元格的值。
我们还可以使用setCellValue()方法设置单元格的值。
这使我们可以轻松地读取和修改工作表中的数据。
3. 设置单元格样式:HSSFSheet允许我们设置单元格的样式,包括字体、颜色、边框等。
我们可以使用createCellStyle()方法创建一个新的单元格样式,并使用setCellStyle()方法将其应用于特定的单元格。
4. 插入和删除行列:HSSFSheet允许我们在工作表中插入和删除行和列。
我们可以使用insertRow()和removeRow()方法插入和删除行,使用shiftRows()方法移动行和列的位置。
5. 合并和拆分单元格:HSSFSheet提供了mergeCells()和splitCell()方法,用于合并和拆分单元格。
VBA之WrokSheet工作表对象

参考上图。
Worksheet.FilterMode 属性 如果工作表处于筛选模式,则为 True。只读 Boolean 类型。 示例:
中返回列。 例如,如果 Range 对象有两个子区域 A1:B2 和 C3:D4,那么,Selection.Columns.Count
的返回值是 2,而不是 4。 若要对一个可能包含多重选定区域的区域使用此属性,请测试 Areas.Count 以确定此区
域内是否包含多个子区域。 如果包含,请对此区域内的每个子区域进行循环。 示例: Worksheets("Sheet1").Columns(1).Font.Bold = True 'sheet1 工作表的第一列字体加粗
WorkSheet 工作表对象(一)
如何引用工作表?
通过 Sheets(index)或 Worksheets(index)可返回一个 WorkSheet 对象(工作簿中如果包含
图表工作表,那 Sheets(index)有可能返回的是图表对象)。
Index 是工作表索引号或者工作表名称。
索引号表示该工作表在工作簿的标签栏上的位置。所有工作表均包含在索引计数中,即
For Each ct In ments Debug.Print ct.Text '在立即窗口中显示批注内容 '可以用代码操作,添加批注
Next End If
Worksheet.CustomProperties 属性 返回一个 CustomProperties 对象,该对象表示与工作表相关的标识符信息。 对于 CustomProperties 属性,工作表的标识符信息可以表示 XML 的元数据。 示例:
Excel VBA中对workbook、worksheet、range的选择和操作

Excel VBA中对workbook、worksheet、range的选择和操作Workbooks对象是Microsoft Excel 应用程序中当前打开的所有Workbook 对象的集合。
有close、add、open等方法。
Workbooks.close' ↑关闭所有打开的工作簿。
Workbooks.Add' ↑创建一个新工作簿。
Workbooks.open Filename:="TEST.XLSX", ReadOnly:=True' ↑将文件TEST.XLSX打开为只读工作簿Workbook对象是一个Microsoft Excel 工作簿。
有Name、Path等属性。
有SaveAs等方法。
有Open、Activate等事件。
∙ThisWorkbook属性返回运行Visual Basic代码的工作簿。
当Visual Basic代码是加载宏的组成部分时,返回加载宏的工作簿,而非调用该加载宏的工作簿。
∙ActiveWorkbook属性返回当前处于活动状态的工作簿。
∙使用Workbooks(index)(其中index 是工作簿名称或索引号)可返回一个Workbook 对象。
index 指创建或打开工作簿的顺序。
Workbooks(1) 是创建的第一个工作簿,而Workbooks(Workbooks.Cou nt)Workbooks返回最后一个打开的工作簿。
激活某工作簿并不更改其索引号。
所有工作簿均包括在索引计数中,即便是隐藏工作簿也是。
Workbooks(1).Activate' ↑激活工作簿一(创建或打开的第一个工作簿)。
Workbooks("TEST.xlsx").Worksheets("Sheet1").Activate' ↑激活名为“TEST.xlsx”的工作簿(该工作簿必须已经在Microsoft Excel 中打开)中的Sheet1。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Worksheet 3
Kathy : Sue, is that you?
Sue: Kathy? Wow, it’s been a long time. I never thought I’d run into you here.
I thought you moved to Oakland.
Kathy: I did, but I didn’t like my job there. It wasn’t my cup of tea. Now I’m back to my old company.
Sue: This place must have gotten under your skin.
Kathy: It did. Besides, I felt out place in Oakland. Anyway, let me give you my new Number. Call me, & we’ll get together & catch up on old times.
Run into – meet by chance
E.g. I often run into my students in the supermarket.
Your e.g. I ran into her in a beautiful fall day.
Someone’s cup of tea – someone’s interest
E.g. Drinking in a bar is not my cup of tea. I feel out of place there.
Your e.g.Surfing the Internet is the young people’s cup of tea now.
A place gets under your skin – become very attached to a place
E.g. After living in China for 7 years, the place really got under my skin.
Your e.g. She said France got under her skin because there have so many kinds of Tulip.
Out of place – not belonging; not comfortable in a situation or place
E.g. I feel out of place in this club. It’s so noisy & everyone is smoking.
Your e.g. The old table is out of the modern house.
Catch up on old times – talk with an old friend about the past
E.g. The two friends, who hadn’t seen each other since donkeys years , stayed up all night catching up on old times.
Your e.g. Due to the hard work everyday, I always eager to meet my older friends to catch up on good times.
Rewrite the sentences below using the expressions you’ve just learned:
I’m not interested in bowling.
Bowing is not my cup of tea.
I love living in China.
China gets under my skin.
The two friends talked about what they had done over the last few years.
The two friends caught up on old times .
I met the boss in the mall.
I run into the boss in the mall.
I feel uncomfortable in noisy places.
I feel out of the noisy places.。