Firstly, I realise this problem could be solved with VBA, but I am looking to keep this workbook macro-free.
What I am trying to do is have several Excel workbooks embedded into my workbook (each embedded workbook is specific to a factory). I want to create a cell that acts as a dynamic hyperlink, which changes depending on which factory is filtered (I don't have any issues creating this dynamic hyperlink myself). The part I don't know how to do, is create a hyperlink that opens a document that is embedded within the workbook. I can make a hyperlink that opens a file saved in a directory, but I need to be able to share this workbook with multiple users, therefore I am embedding the documents.
Hopefully this makes sense - to summarise; I need to create a button/hyperlink that opens an embedded document WITHOUT VBA.
Many thanks
You have an EXCEL function HYPERLINK that receives a string (i.e. URL) as the first parameter. You can of course set BUILD the URL with a formula or a reference to other cell.
For instance, if you set in a cell the value:
=HYPERLINK("http://www.google.com")
and link on it, Google's page will be open on your browser. If you set the link to point to a file (any file) it will open it with the suitable application (e.g. Excel).
Is this what you were looking for?
Related
I'm attempting to build a monthly process that converts an excel file to a PDF with bookmarks for each respective sheet. I'm not seeing a method to successfully create PDF bookmarks from within the Excel workbook. Can this be accomplished without third-party software?
What I've tried:
Using Header 1 for a cell as well as an entire row.
Putting Excel Book Mark within the file using a hyperlink reference.
Adding named range.
OneDrive flow Convert File
Adding a Header.
Reviewed some VBA Ref libraries hoping to find an object.bookmark type approach.
Unfortunately, all attempts have resulted in a PDF file with no bookmarks.
Is there a method to create PDF Bookmarks from Excel? Possibly a VBA ref library that I am unaware of or some front-end trick? Unfortunately, I'm stuck working only with Microsoft tools. Adobe's Excel Add-On does exactly what I'm trying to achieve.
The problem
I have eight Excel documents that are stored on a Sharepoint site. One of those documents (“receiving file”) contains formulas/cell references to the other seven documents (“source files”) on Sharepoint.
Everything works when the references are created.
Once the workbooks are saved and closed and then reopened, the receiving file no longer updates the values from the source files.
The files are synced in Windows Explorer and opened in the desktop version of Excel. Also, all eight files are opened at the same time.
The reference will first look something like this
='[Source file.xlsx]Sheet1'!$A$1
After closing and reopening, the references will look like this
='https://somecompanyname.sharepoint.com/sites/SitefortestingExcelreferences/Shared Documents/[Source file.xlsx]Sheet1'!$A$1
If I now change a value in the source value, the change will not appear in the receiving file.
What I tried so far
Setting “Calculation” to “Automatic.
Click “Calculate Now” and “Calculate Sheet”.
Double-click into the cell with the reference and hit enter.
In “Data > Queries & Connections” click “Refresh all”
In “Data > Queries & Connections > Edit Link” I clicked on update values. It did not help. However, I tried to rebuild a simple system with just two files and a single reference, and here it did work
Starting from point 5) I programmed a little macro that updates all links in all open workbooks (it did not help either):
Option Explicit
Sub UpdateAllConnections()
Dim wbWorkbook As Workbook
For Each wbWorkbook In Application.Workbooks
wbWorkbook.UpdateLink Name:=wbWorkbook.LinkSources, Type:=xlExcelLinks
Next wbWorkbook
MsgBox "Update complete.", vbInformation, "Complete"
End Sub
If I remove the path to SharePoint, so the formula looks like this
='[Source file.xlsx]Sheet1'!$A$1
It works again (until I save and reopen).
I found the following on Microsoft Answers (about OneDrive but it's probably the same issue):
https://answers.microsoft.com/en-us/msoffice/forum/all/excel-value-links-not-updating-on-onedrive/e48a7680-71e6-4a77-9eb1-e03ec7f0e3e0
I contacted the official O365 support desk and they told me this is built into the connection between Excel and OneDrive.
They have received thousands of complaints and there is no fix for it.
No option to tell Excel/Office/OneDrive to link to local copies of files on 1D by default.
No fix is planned as this is not how MS envisions how Excel/1D should be used.
My question
Any suggestions? Are there any tools in Excel that can be used to update the linked cells automatically or manually? Might SharePoint settings prevent the update?
If not, since removing the file path to SharePoint seems to work is there a way (using VBA) to remove the full file path from all cell references, so
='https://somecompanyname.sharepoint.com/sites/SitefortestingExcelreferences/Shared Documents/[Source file.xlsx]Sheet1'!$A$1
becomes
='[Source file.xlsx]Sheet1'!$A$1
I could probably loop through all cells and simply replace the path with nothing, but that would only work if I know the file path beforehand and if all the files are stored in the same SharePoint folder.
I had the same issue and here is my workaround: I can open the source file on the Sharepoint site by clicking ... and then Open in App (as opposed to Open in Browser) The referecence cell in the receiving file will become ='[Source file.xlsx]Sheet1'!$A$1 again and get automatically updated.
My workaround would be to consolidate external links onto a single sheet, and manually or use a macro to copy / hard paste to another identical page that you use for the links.
Just run the macro when you have the workbook open on your desktop to update the values.
Even simpler, you could also have a sort of database with linked values in a column and hard copies pasted into another column. This would be simpler than two identically sized sheets.
BUT, you could also go crazy and have named ranges like quarterly_total_formula and an analogue somewhere else called quarterly_total_valueonly and then write a macro to iterate over each with a for each looking for things "LIKE" *_formula and hard paste each result into the complementary *_valueonly spot... but then you'd need a macro to check that they were all paired... and by that point you might as well not waste your time in Excel and develop in Power BI, Tableau, RMarkdown, or heck learn Adobe Illustrator or work directly in HTML.
I am trying to automate a process where data is queried from the database, downloaded into an excel file and sent to recipients. One of the column in the excel file needs to be a hyperlink. How can i make this happen?
I selected =hyperlink(A,B) into the column but the function appears as text and not as hyperlink.
I tried changing the web options to 'update links on save' but it does not help.
Only when i click in the cell and hit enter does the hyperlink appear. This is not an option
Opening the file and adding a new column to use the hyperlink function is not an option either since the process is being automated.
The tool allows me to export into an xlsx and not a xlsm so i am assuming i cannot use macros to do the job.
I tried researching the answers for similar questions but didnt find any that i could use which will generate a url dynamically without me having to open the file. Any ideas?
I also tried another tool and they were able to send out emails with links. I do not know how they do it internally but i do not see any hyperlink functions when i tab into the hyperlink column.
Cell type should probably be set to "Generic".
You may also need to trigger a "Refresh" after the workbook is filled with all the data. Sometimes I need to that manually - but only once. I have no idea why it happens.
I'm writing a program to read some data from an OOXML Excel Workbook using Apache POI that was provided to me as example input data. There is a strange sheet named D%$&01_DevSheet at the end. It is full of formula cells with weird formulas that reference most of the other sheets in the workbook. Here is an example of one of the cells:
'Horizontal Agreements'!S15+"8I/!%4\"
It is also not visible when the worksheet is opened in Excel.
I've never run across such a sheet before. It looks like some kind of internal Excel structure. Google searches for "D%$&01_DevSheet" and "excel" "DevSheet" have turned up nothing useful.
This sheet is not present in any test workbooks I've created. However, I'm not much of an Excel user and I did not exhaustively try all Excel features.
At this point, I'm going to hard code a rule that excludes sheets ending in _DevSheet from processing. However, since this stuff is turning up in my input, I think I should understand and handle it properly, so I have some basic questions:
What does Excel use sheets like D%$&01_DevSheet for?
What user actions cause them to be created?
Are they named regularly?
What is the most reliable way of detecting sheets like this Apache POI?
Normally Excel does not use such a sheet, so it seems to be added by some specific application or tool that was used to create this Excel workbook. It seems the developer of the application stores formulas and other things in a separate sheet for separation from the user-visible content.
So likely you will need to contact/research whichever application provided this file and get more information about this sheet from there.
You can probably only exclude these sheet by name as you already did.
I recently made an Excel workbook (with the help of Stackoverflow) where I have a regular input of data (each entry is one row with different columns). I then have a macro that extracts the data from a specified row to a different sheet and saves this sheet as a .PDF.
That way, I can extract specific data from this Excel "database" to a readable pdf. I do this because I need a paper version from specific entries.
For a different project I need to implement the same principle. The only difference is that I need to work with an .mdb file where the data is stored, instead of an Excel workbook.
Is there a way I can reuse my code from Excel or is it now a completely different story?
Thank you for the advice.
You can link your excel workbook to your Access tables. On the "DATA" ribbon there is a section for "External Data".
Once you've got the Access data displayed on one of your worksheets, you should be able to adapt your existing code accordingly.
From Microsoft:
Connect an Access database to your workbook