简体   繁体   English

在Excel中打开特定的工作表

[英]Open specific Worksheet in Excel

i have a problem to open an Excelfile (from a Sharepoint Server) to a specific Sheet (eg. Sheet3). 我在打开Excel文件(从Sharepoint Server)到特定工作表(例如Sheet3)时遇到问题。

I have already tried: 我已经尝试过:

http://PathToFile/PathtoFile/Excelfile.xlsx#Sheet3

or http://PathToFile/PathtoFile/Excelfile.xlsx#Sheet3!A1 http://PathToFile/PathtoFile/Excelfile.xlsx#Sheet3!A1

or http://PathToFile/PathtoFile/Excelfile.xlsx#'Sheet3'!A1 http://PathToFile/PathtoFile/Excelfile.xlsx#'Sheet3'!A1

or http://PathToFile/PathtoFile/Excelfile.xlsx#"Sheet3"!A1 http://PathToFile/PathtoFile/Excelfile.xlsx#"Sheet3"!A1

but no one of this Links open the right sheet... I only get the download massage from IE and it opens the last opened Sheet. 但此链接中没有一个打开正确的工作表...我仅从IE获得下载消息,并且它打开了最后打开的工作表。

Do i make any big misstake? 我会犯什么大错吗? I am using Office 2016 (at a PC, non Mac). 我正在使用Office 2016(在非Mac的PC上)。

I hope someone can help me with this Problem and sorry for my bad English ;-) 我希望有人可以帮助我解决这个问题,对不起我的英语不好;-)

By default, Excel files will open to the sheet that was active when the workbook was last saved. 默认情况下,Excel文件将打开到上次保存工作簿时处于活动状态的工作表。 AFAIK there is no command line or URL parameter to set a specific sheet to be active when the file is opened. AFAIK没有命令行或URL参数可将特定的图纸设置为在打开文件时处于活动状态。

You may want to use a Workbook_Open event in VBA to force the workbook to display a specific sheet. 您可能要在VBA中使用Workbook_Open事件来强制工作簿显示特定的工作表。

I spent way too long on this very problem. 我在这个问题上花了太长时间。 My use case was simpler: I maintain a fairly complex set of account data in Excel and needed to expose certain reports on it (pivot tables, queries) to salespeople. 我的用例比较简单:我在Excel中维护了一组相当复杂的帐户数据,需要将某些报表(数据透视表,查询)向销售人员公开。

Appending ActiveCell=CellName didn't work but using the Item=itemName URL parameter did. 附加ActiveCell=CellName无效,但使用Item=itemName URL参数有效。 I just made sure that every table had a unique name. 我只是确保每个表都有唯一的名称。 I then grabbed the Sharepoint URL from Share | 然后,我从“共享” |“获取” Sharepoint URL。 Copy Link and appended the appropriate parameter, eg, Item=report_name_of_table . 复制链接并附加适当的参数,例如Item=report_name_of_table

Not pretty, but it worked. 不漂亮,但是有效。

First create a named range for the table or data on the spreadsheet you want to link to. 首先,为要链接到的电子表格上的表或数据创建一个命名范围。 Now that I think of it I don't think it's necessary. 现在我想到了,我认为没有必要。 But do it if all else fails. 但是如果其他所有方法都失败了,那就去做。 :-) :-)

At the end of your file path add this ?web=1?range='YourWorksheetName' Where YourWorksheetName will be the name of the worksheet or the table range name. 在文件路径的末尾添加此?web=1?range='YourWorksheetName'其中YourWorksheetName将是工作表的名称或表范围的名称。

Your final path will look something like this assuming it's an Excel you are linking to in a SharePoint data library... 假设您是要链接到SharePoint数据库中的Excel,您的最终路径将类似于以下内容...

http://xxx/xxxxxx/xx/archmetrics/Data%20Library/3Q%202018%20Reporting.xlsx?web=1?range='TimeInPhase'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM