以下是使用Python和openpyxl模块生成多个工作表并将指定内容填充到相应工作表中的示例代码:
```python
import openpyxl
# 创建一个新的Excel文件
workbook = openpyxl.Workbook()
# 创建3个工作表
worksheet1 = workbook.active
worksheet1.title = "Sheet1"
worksheet2 = workbook.create_sheet("Sheet2")
worksheet3 = workbook.create_sheet("Sheet3")
# 在Sheet1中填充数据
worksheet1['A1'] = '姓名'
worksheet1['B1'] = '年龄'
worksheet1['C1'] = '性别'
worksheet1['A2'] = '张三'
worksheet1['B2'] = 20
worksheet1['C2'] = '男'
worksheet1['A3'] = '李四'
worksheet1['B3'] = 25
worksheet1['C3'] = '女'
# 在Sheet2中填充数据
worksheet2['A1'] = '学科'
worksheet2['B1'] = '分数'
worksheet2['A2'] = '语文'
worksheet2['B2'] = 90
worksheet2['A3'] = '数学'
worksheet2['B3'] = 85
# 在Sheet3中填充数据
worksheet3['A1'] = '日期'
worksheet3['B1'] = '销售额'
worksheet3['A2'] = '2021-01-01'
worksheet3['B2'] = 1000
worksheet3['A3'] = '2021-01-02'
worksheet3['B3'] = 1500
# 保存Excel文件
workbook.save('example.xlsx')
```
在上述示例代码中,我们首先创建了一个新的Excel文件,并使用`create_sheet()`方法创建了3个工作表。然后,我们在每个工作表中填充了不同的数据。最后,我们使用`save()`方法将Excel文件保存到本地磁盘中。
您可以根据自己的需求修改示例代码中的工作表名称和填充的数据。