I have in Calc a column with thousands of links to images, each in its own row. Is it possible to load and display them in the next column? I read that LO also supports VBA scripts, so I found a VBA script for Excel, but it doesn’t work in Calc, it writes an error “Basic syntax error. Unknown data type Shape”
Here is the script:
https://www.extendoffice.com/documents/excel/4212-excel-insert-image-from-url.html#a1
Did you set Option VBA Support 1
(LibreOffice Help - Option VBASupport Statement)? No guarantee that it will work, if set, but there is a guarantee that VBA scripts won’t work, if not set.
When I run a macro with the parameter “Option VBA Support 1”, Calc always crashes.
… Calc always crashes
tdf#134576
I could see the crash when the macro was in shared library, but not when the macro was in an ODS file.
Yes, in that case Calc will not crash, but it will also not download the images.
Now when I want to remove the macro from the shared library, LO always crashes. Deleting from Appdata didn’t help, but at least the error messages don’t pop up after running LO.
Edit: the error does not pop up after editing dialog.xlc and script.xlc
As for the generation speed, I will clarify one thing that I think is quite important. Generating images is much faster if you only have URLs in the sheet from which you need to generate an image, I had various columns in the sheet, including a column with links to individual product pages, and thus the VBA script / extension tried to generate an image from such link, which took time, and the document was horribly slow to scroll and edit when finished.
This extension is terribly demanding on the performance of the computer, everything freezes, then when it is already completed, it still consumes resources in the background. But thank you for your effort.
Do you take images from a local resource or from the Internet? In any case, this is faster than converting all the links manually, isn’t it?
This extension was first published on November 27, 2011 here - it still works.
You’re right, but there are thousands of pictures, so it would have to run all night. Excel can do it much faster (I’d rather do it in LO). Thanks for help.
I don’t think the poor performance is about the extension. It’s more likely that it’s some performance problem in Calc handling many inserted images. You are welcome to file a bug report with a sample ZIP containing an ODS (with links) and images, to try to reproduce it.
So I’m coming back again. At the time we were discussing here, I probably didn’t have a powerful enough computer for such operations. Now both the extension and the VBA script work for me (Calc no longer crashes), that is, on most URLs, which is why I’m writing here. Images from the following URLs are not loaded either through the aforementioned extension, or through a VBA script, or in Excel 2016 through the same script. However, in Excel 2021, the images will be displayed through the same script, or even through Kutools for Excel. Don’t know where the problem is? Thank you.
https://image.shopmoment.com/general/Moment-106-174-DayChaser-35L-Blue-thumbnail.jpg
https://image.shopmoment.com/general/Moment-106-173-DayChaser-35L-Black-thumbnail.jpg
https://image.shopmoment.com/general/Moment-Benro-BMBPPROCBLK-MeFOTO-Carbon-Fiber-BackPacker-Pro-Black-Thumbnail.jpg
https://image.shopmoment.com/general/Moment-Benro-BMGTPROCBLK-MeFOTO-Carbon-Fiber-GlobeTrotter-Pro-Black-thumbnail.jpg
https://image.shopmoment.com/general/Moment-Benro-A3883TS6PRO-Benro-Aero6-Pro-Travel-Video-Tripod-Aluminum-thumbnail.jpg
https://image.shopmoment.com/general/Moment-Benro-C08D6B-Benro-MoveOver8B-Carbon-Fiber-Slider-thumbnail.jpg
https://image.shopmoment.com/general/Moment-Benro-C08D9B-Benro-MoveOver8B-Carbon-Fiber-Slider-thumbnail.jpg
https://image.shopmoment.com/general/Moment-Benro-FTR28CB1GBLK-Benro-Tripster-Series-2-Cf-Blk-thumbnail.jpg
I found that Excel 2021 displays only those images that I have already opened previously in the browser. Kutools will display all, even unopened ones.
This is a separate question, basically unrelated to the original. Please create another question, to allow a targeted answer, and to be useful as a general source of information. In the question, provide the necessary context, like pointer to the extension, and a sample spreadsheet which allows to see the problem (even if it just contains a list of mentioned URLs).