Sharepoint: Web Part (Spreadsheet) Auto Open to first Workbook

%3CLINGO-SUB%20id%3D%22lingo-sub-855065%22%20slang%3D%22en-US%22%3ESharepoint%3A%20Web%20Part%20(Spreadsheet)%20Auto%20Open%20to%20first%20Workbook%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-855065%22%20slang%3D%22en-US%22%3E%3CP%3EIs%20there%20a%20way%20that%20when%20a%20file%20view%20web%20part%20is%20added%20to%20a%20modern%20page%20to%20insert%20a%20spreadsheet%20that%20when%20the%20spreadsheet%20is%20open%20it%20will%20automatically%20open%20to%20the%20first%20workbook%20to%20a%20certain%20cell%3F%20Right%20now%20it%20opens%20on%20the%20second%20workbook%2C%20or%20will%20open%20on%20the%20first%20workbook%20but%20scrolled%20half%20way%20to%20the%20right.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20tried%20saving%20the%20originating%20spreadsheet%20with%20cell%20A1%20selected%20in%20the%20first%20workbook.%26nbsp%3B%20Does%20not%20work%20with%20opening%20in%20the%20app%20or%20online%20or%20via%20a%20web%20part%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20tried%20adding%20VB%20code%20to%20the%20originating%20workbook%20to%20open%20A1%20in%20the%20first%20workbook.%26nbsp%3B%20This%20works%20when%20opening%20the%20file%20in%20the%20app%2C%20but%20not%20online%20or%20via%20a%20web%20part.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPrivate%20Sub%20Workbook_Open()%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20Worksheets(%22First%20Workbook%22).Activate%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BRange(%22A1%22).Select%3CBR%20%2F%3EEnd%20Sub%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-855065%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESites%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-855125%22%20slang%3D%22en-US%22%3ERe%3A%20Sharepoint%3A%20Web%20Part%20(Spreadsheet)%20Auto%20Open%20to%20first%20Workbook%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-855125%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F408672%22%20target%3D%22_blank%22%3E%40LawrenceNapier%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere%20are%20options%20in%20%22File%20Viewer%22%20web%20part%20that%20will%20allow%20you%20specify%20a%20starting%20sheet%20and%20range.%20See%20image%20below.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20339px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F131764i377D6483CB3681AA%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Untitled.png%22%20title%3D%22Untitled.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EMore%20information%20located%20here%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2Fconnect-web-parts-in-sharepoint-online-b457668c-d843-4b1b-8977-a6f9228a1dec%23bkmk_fileviewer%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2Fconnect-web-parts-in-sharepoint-online-b457668c-d843-4b1b-8977-a6f9228a1dec%23bkmk_fileviewer%3C%2FA%3E.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20hope%20this%20helps.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENorm%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

Is there a way that when a file view web part is added to a modern page to insert a spreadsheet that when the spreadsheet is open it will automatically open to the first workbook to a certain cell? Right now it opens on the second workbook, or will open on the first workbook but scrolled half way to the right.

 

I've tried saving the originating spreadsheet with cell A1 selected in the first workbook.  Does not work with opening in the app or online or via a web part 

 

I've tried adding VB code to the originating workbook to open A1 in the first workbook.  This works when opening the file in the app, but not online or via a web part.  

 

Private Sub Workbook_Open()
    Worksheets("First Workbook").Activate
     Range("A1").Select
End Sub

 

1 Reply

Hi @LawrenceNapier,

 

There are options in "File Viewer" web part that will allow you specify a starting sheet and range. See image below.

Untitled.png

More information located here: https://support.office.com/en-us/article/connect-web-parts-in-sharepoint-online-b457668c-d843-4b1b-8....

 

I hope this helps.

 

Norm