1

Power View in Excel 2013 Pro-Plus:

Trying to create cards in power view containing employee names along with a small photo. My entire model is made of Linked Tables in Excel. Does anyone know how to upload the image files into PowerPivot?

Not interested in URLs but rather in the "binary data embedded in the workbook" option. The images are locally on my hard drive as well as the Workbook.

Sumit Bijvani
  • 8,154
  • 17
  • 50
  • 82
MotiLui
  • 31
  • 4

2 Answers2

0

I am assuming the images will remain relatively static. The best way is to get them into SQL, in my opinion, again I am assuming your linked tables come from SQL.

I use something like this to pickup profile pictures and insert them into a SQL table, then use that table in PowerPivot.

    CREATE TABLE [dbo].[TblImage](
        [Image_Data] [image] NULL,
         [Image_FileName] Varchar(128),
         [User] Varchar(128))
    INSERT INTO TblImage( Image_FileName, [User], Image_Data)
    SELECT 'Feb2012.jpg', 'My Friend',
    * FROM OPENROWSET(BULK N'C:\Backup\f1_SThumb.jpg', SINGLE_BLOB) as tempImg

    INSERT INTO TblImage( Image_FileName, [User], Image_Data)
    SELECT 'Feb2012.jpg', 'My Friend 2',
    * FROM OPENROWSET(BULK N'C:\Backup\f2_MThumb.jpg', SINGLE_BLOB) as tempImg

If you can find a way to import the images in Excel as binary with VBA, please let me know, I have not yet found a reliable way to do so.

From MS a nice guide to working with images in PowerView

Or Dan English's Using Database Images in Tabular BI Semantic Models with Power View

But if you want to go through the effort or embedding the data, SQL is by far the easier route to take. I will gladly admit that I have tried and failed on various occasions with Excel and VBA, but opted for the SQL route instead.

Adrian Sullivan
  • 397
  • 3
  • 6
  • Thank you for your detailed answer. As I mentioned, our data tables are not in SQL but still in Excel. I was hoping this would be possible to do without the use of SQL. Is this possible? – MotiLui Oct 31 '13 at 06:17
  • 1
    The problem arises that you cannot really easily convert images to binary so that they can be stored in Excel. The easiest is to do it in SQL and link that table in the data model. Alternative is using image url on local drive – Adrian Sullivan Oct 31 '13 at 07:42
0

There is a way if you use PowerQuery and create a connection to a folder containing the image files.

H.Scheidl
  • 815
  • 3
  • 11
  • 25