Can I link images using a relative path?
up vote
2
down vote
favorite
I am working on an MS Excel workbook that contains around 200 images. They are currently saved within the workbook, so the file becomes huge and working gets very slow.
Linking the pictures without saving them works very well -- I now have the Excel document and a folder "pictures" next to it that contains all my image files.
However, when I move the document and the folder to a new location, all my pictures disappear. This seems to be because Excel saves the link information as absolute paths. (Update: Actually, according to this thread, Excel stores the link information as relative paths as well. Now I really don't know why my links break down..)
Is there a convenient way to save them as relative paths or have Excel automatically update the path information?
Update: It's important that the images get displayed on the sheet and can be printed.
I am working with Microsoft Excel for Mac 2008 and 2011.
I really appreciate your help.
microsoft-excel microsoft-excel-2011 microsoft-excel-2008
migrated from stackoverflow.com Jun 25 '13 at 11:00
This question came from our site for professional and enthusiast programmers.
add a comment |
up vote
2
down vote
favorite
I am working on an MS Excel workbook that contains around 200 images. They are currently saved within the workbook, so the file becomes huge and working gets very slow.
Linking the pictures without saving them works very well -- I now have the Excel document and a folder "pictures" next to it that contains all my image files.
However, when I move the document and the folder to a new location, all my pictures disappear. This seems to be because Excel saves the link information as absolute paths. (Update: Actually, according to this thread, Excel stores the link information as relative paths as well. Now I really don't know why my links break down..)
Is there a convenient way to save them as relative paths or have Excel automatically update the path information?
Update: It's important that the images get displayed on the sheet and can be printed.
I am working with Microsoft Excel for Mac 2008 and 2011.
I really appreciate your help.
microsoft-excel microsoft-excel-2011 microsoft-excel-2008
migrated from stackoverflow.com Jun 25 '13 at 11:00
This question came from our site for professional and enthusiast programmers.
Please do a bit of research before posting: See here and here for answers.
– zx8754
Jun 25 '13 at 8:20
I did read about this and tried it out yesterday. The problem is that when I add a hyperlink to an image file instead of an image file as a link, the image won't get displayed in my Excel sheet. I need to be able to view the images in my sheet and print them.
– Port Islander 2009
Jun 25 '13 at 8:31
Related: superuser.com/q/876356/234848
– Hugh
Feb 23 at 10:16
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I am working on an MS Excel workbook that contains around 200 images. They are currently saved within the workbook, so the file becomes huge and working gets very slow.
Linking the pictures without saving them works very well -- I now have the Excel document and a folder "pictures" next to it that contains all my image files.
However, when I move the document and the folder to a new location, all my pictures disappear. This seems to be because Excel saves the link information as absolute paths. (Update: Actually, according to this thread, Excel stores the link information as relative paths as well. Now I really don't know why my links break down..)
Is there a convenient way to save them as relative paths or have Excel automatically update the path information?
Update: It's important that the images get displayed on the sheet and can be printed.
I am working with Microsoft Excel for Mac 2008 and 2011.
I really appreciate your help.
microsoft-excel microsoft-excel-2011 microsoft-excel-2008
I am working on an MS Excel workbook that contains around 200 images. They are currently saved within the workbook, so the file becomes huge and working gets very slow.
Linking the pictures without saving them works very well -- I now have the Excel document and a folder "pictures" next to it that contains all my image files.
However, when I move the document and the folder to a new location, all my pictures disappear. This seems to be because Excel saves the link information as absolute paths. (Update: Actually, according to this thread, Excel stores the link information as relative paths as well. Now I really don't know why my links break down..)
Is there a convenient way to save them as relative paths or have Excel automatically update the path information?
Update: It's important that the images get displayed on the sheet and can be printed.
I am working with Microsoft Excel for Mac 2008 and 2011.
I really appreciate your help.
microsoft-excel microsoft-excel-2011 microsoft-excel-2008
microsoft-excel microsoft-excel-2011 microsoft-excel-2008
edited Mar 20 '17 at 10:17
Community♦
1
1
asked Jun 25 '13 at 7:50
Port Islander 2009
1113
1113
migrated from stackoverflow.com Jun 25 '13 at 11:00
This question came from our site for professional and enthusiast programmers.
migrated from stackoverflow.com Jun 25 '13 at 11:00
This question came from our site for professional and enthusiast programmers.
Please do a bit of research before posting: See here and here for answers.
– zx8754
Jun 25 '13 at 8:20
I did read about this and tried it out yesterday. The problem is that when I add a hyperlink to an image file instead of an image file as a link, the image won't get displayed in my Excel sheet. I need to be able to view the images in my sheet and print them.
– Port Islander 2009
Jun 25 '13 at 8:31
Related: superuser.com/q/876356/234848
– Hugh
Feb 23 at 10:16
add a comment |
Please do a bit of research before posting: See here and here for answers.
– zx8754
Jun 25 '13 at 8:20
I did read about this and tried it out yesterday. The problem is that when I add a hyperlink to an image file instead of an image file as a link, the image won't get displayed in my Excel sheet. I need to be able to view the images in my sheet and print them.
– Port Islander 2009
Jun 25 '13 at 8:31
Related: superuser.com/q/876356/234848
– Hugh
Feb 23 at 10:16
Please do a bit of research before posting: See here and here for answers.
– zx8754
Jun 25 '13 at 8:20
Please do a bit of research before posting: See here and here for answers.
– zx8754
Jun 25 '13 at 8:20
I did read about this and tried it out yesterday. The problem is that when I add a hyperlink to an image file instead of an image file as a link, the image won't get displayed in my Excel sheet. I need to be able to view the images in my sheet and print them.
– Port Islander 2009
Jun 25 '13 at 8:31
I did read about this and tried it out yesterday. The problem is that when I add a hyperlink to an image file instead of an image file as a link, the image won't get displayed in my Excel sheet. I need to be able to view the images in my sheet and print them.
– Port Islander 2009
Jun 25 '13 at 8:31
Related: superuser.com/q/876356/234848
– Hugh
Feb 23 at 10:16
Related: superuser.com/q/876356/234848
– Hugh
Feb 23 at 10:16
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
You have 2 basic questions here, rendering images in Excel, and relative paths.
Rendering Images in Excel
There's a script to accomplish this on SO:
Dim url_column As Range
Dim image_column As Range
Set url_column = Worksheets(1).UsedRange.Columns("A")
Set image_column = Worksheets(1).UsedRange.Columns("B")
Dim i As Long
For i = 1 To url_column.Cells.Count
With image_column.Worksheet.Pictures.Insert(url_column.Cells(i).Value)
.Left = image_column.Cells(i).Left
.Top = image_column.Cells(i).Top
image_column.Cells(i).EntireRow.RowHeight = .Height
End With
Next
Relative Paths
I don't know of a way to specify relative paths in an Excel doc, but there's an easy workaround for this. Create a folder for you Excel doc and all of the supporting images, and keep them together. If you need to move this to another location, you just move the whole folder. This also makes it easy to zip up & send to others.
Thank you for your reply. Your suggestion for the relative path issue would be great, but this is exactly what I can't get to work. I read on SO that linked files are actually saved relatively as well (superuser.com/questions/394270/…), but whenever I move or rename the whole folder with excel doc and images, the links are all broken. What am I doing wrong?
– Port Islander 2009
Jun 27 '13 at 9:25
add a comment |
up vote
0
down vote
Use the Find/Replace feature in Excel to update the path of your image file. I moved my files from /Desktop to /Dropbox. I replaced "desktop" with "dropbox" and within seconds, all my image paths updated. :)
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
You have 2 basic questions here, rendering images in Excel, and relative paths.
Rendering Images in Excel
There's a script to accomplish this on SO:
Dim url_column As Range
Dim image_column As Range
Set url_column = Worksheets(1).UsedRange.Columns("A")
Set image_column = Worksheets(1).UsedRange.Columns("B")
Dim i As Long
For i = 1 To url_column.Cells.Count
With image_column.Worksheet.Pictures.Insert(url_column.Cells(i).Value)
.Left = image_column.Cells(i).Left
.Top = image_column.Cells(i).Top
image_column.Cells(i).EntireRow.RowHeight = .Height
End With
Next
Relative Paths
I don't know of a way to specify relative paths in an Excel doc, but there's an easy workaround for this. Create a folder for you Excel doc and all of the supporting images, and keep them together. If you need to move this to another location, you just move the whole folder. This also makes it easy to zip up & send to others.
Thank you for your reply. Your suggestion for the relative path issue would be great, but this is exactly what I can't get to work. I read on SO that linked files are actually saved relatively as well (superuser.com/questions/394270/…), but whenever I move or rename the whole folder with excel doc and images, the links are all broken. What am I doing wrong?
– Port Islander 2009
Jun 27 '13 at 9:25
add a comment |
up vote
0
down vote
You have 2 basic questions here, rendering images in Excel, and relative paths.
Rendering Images in Excel
There's a script to accomplish this on SO:
Dim url_column As Range
Dim image_column As Range
Set url_column = Worksheets(1).UsedRange.Columns("A")
Set image_column = Worksheets(1).UsedRange.Columns("B")
Dim i As Long
For i = 1 To url_column.Cells.Count
With image_column.Worksheet.Pictures.Insert(url_column.Cells(i).Value)
.Left = image_column.Cells(i).Left
.Top = image_column.Cells(i).Top
image_column.Cells(i).EntireRow.RowHeight = .Height
End With
Next
Relative Paths
I don't know of a way to specify relative paths in an Excel doc, but there's an easy workaround for this. Create a folder for you Excel doc and all of the supporting images, and keep them together. If you need to move this to another location, you just move the whole folder. This also makes it easy to zip up & send to others.
Thank you for your reply. Your suggestion for the relative path issue would be great, but this is exactly what I can't get to work. I read on SO that linked files are actually saved relatively as well (superuser.com/questions/394270/…), but whenever I move or rename the whole folder with excel doc and images, the links are all broken. What am I doing wrong?
– Port Islander 2009
Jun 27 '13 at 9:25
add a comment |
up vote
0
down vote
up vote
0
down vote
You have 2 basic questions here, rendering images in Excel, and relative paths.
Rendering Images in Excel
There's a script to accomplish this on SO:
Dim url_column As Range
Dim image_column As Range
Set url_column = Worksheets(1).UsedRange.Columns("A")
Set image_column = Worksheets(1).UsedRange.Columns("B")
Dim i As Long
For i = 1 To url_column.Cells.Count
With image_column.Worksheet.Pictures.Insert(url_column.Cells(i).Value)
.Left = image_column.Cells(i).Left
.Top = image_column.Cells(i).Top
image_column.Cells(i).EntireRow.RowHeight = .Height
End With
Next
Relative Paths
I don't know of a way to specify relative paths in an Excel doc, but there's an easy workaround for this. Create a folder for you Excel doc and all of the supporting images, and keep them together. If you need to move this to another location, you just move the whole folder. This also makes it easy to zip up & send to others.
You have 2 basic questions here, rendering images in Excel, and relative paths.
Rendering Images in Excel
There's a script to accomplish this on SO:
Dim url_column As Range
Dim image_column As Range
Set url_column = Worksheets(1).UsedRange.Columns("A")
Set image_column = Worksheets(1).UsedRange.Columns("B")
Dim i As Long
For i = 1 To url_column.Cells.Count
With image_column.Worksheet.Pictures.Insert(url_column.Cells(i).Value)
.Left = image_column.Cells(i).Left
.Top = image_column.Cells(i).Top
image_column.Cells(i).EntireRow.RowHeight = .Height
End With
Next
Relative Paths
I don't know of a way to specify relative paths in an Excel doc, but there's an easy workaround for this. Create a folder for you Excel doc and all of the supporting images, and keep them together. If you need to move this to another location, you just move the whole folder. This also makes it easy to zip up & send to others.
edited May 23 '17 at 12:41
Community♦
1
1
answered Jun 26 '13 at 18:48
Lenwood
20317
20317
Thank you for your reply. Your suggestion for the relative path issue would be great, but this is exactly what I can't get to work. I read on SO that linked files are actually saved relatively as well (superuser.com/questions/394270/…), but whenever I move or rename the whole folder with excel doc and images, the links are all broken. What am I doing wrong?
– Port Islander 2009
Jun 27 '13 at 9:25
add a comment |
Thank you for your reply. Your suggestion for the relative path issue would be great, but this is exactly what I can't get to work. I read on SO that linked files are actually saved relatively as well (superuser.com/questions/394270/…), but whenever I move or rename the whole folder with excel doc and images, the links are all broken. What am I doing wrong?
– Port Islander 2009
Jun 27 '13 at 9:25
Thank you for your reply. Your suggestion for the relative path issue would be great, but this is exactly what I can't get to work. I read on SO that linked files are actually saved relatively as well (superuser.com/questions/394270/…), but whenever I move or rename the whole folder with excel doc and images, the links are all broken. What am I doing wrong?
– Port Islander 2009
Jun 27 '13 at 9:25
Thank you for your reply. Your suggestion for the relative path issue would be great, but this is exactly what I can't get to work. I read on SO that linked files are actually saved relatively as well (superuser.com/questions/394270/…), but whenever I move or rename the whole folder with excel doc and images, the links are all broken. What am I doing wrong?
– Port Islander 2009
Jun 27 '13 at 9:25
add a comment |
up vote
0
down vote
Use the Find/Replace feature in Excel to update the path of your image file. I moved my files from /Desktop to /Dropbox. I replaced "desktop" with "dropbox" and within seconds, all my image paths updated. :)
add a comment |
up vote
0
down vote
Use the Find/Replace feature in Excel to update the path of your image file. I moved my files from /Desktop to /Dropbox. I replaced "desktop" with "dropbox" and within seconds, all my image paths updated. :)
add a comment |
up vote
0
down vote
up vote
0
down vote
Use the Find/Replace feature in Excel to update the path of your image file. I moved my files from /Desktop to /Dropbox. I replaced "desktop" with "dropbox" and within seconds, all my image paths updated. :)
Use the Find/Replace feature in Excel to update the path of your image file. I moved my files from /Desktop to /Dropbox. I replaced "desktop" with "dropbox" and within seconds, all my image paths updated. :)
answered Dec 20 '13 at 17:24
user283528
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f611750%2fcan-i-link-images-using-a-relative-path%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Please do a bit of research before posting: See here and here for answers.
– zx8754
Jun 25 '13 at 8:20
I did read about this and tried it out yesterday. The problem is that when I add a hyperlink to an image file instead of an image file as a link, the image won't get displayed in my Excel sheet. I need to be able to view the images in my sheet and print them.
– Port Islander 2009
Jun 25 '13 at 8:31
Related: superuser.com/q/876356/234848
– Hugh
Feb 23 at 10:16