It's easy to add a picture to a sheet with Spreadsheet Light like this:
SLPicture logoPic = new SLPicture(@"C:\Platypus\DuckbillsUnlimited.png");
logoPic.SetPosition(0, 13);
sl.InsertPicture(logoPic);
...but I want to use an image at an URL, not from a file. How is this accomplished?
I tried using the image URL directly in the constructor of SLPicture, however that is not supported. You can use a workaround as follows:
Modification to your sample code can be shown as follows:
WebClient client = new WebClient();
client.DownloadFile(new Uri(url), @"C:\Platypus\DuckbillsUnlimited.png");
SLPicture pic = new SLPicture(@"C:\Platypus\DuckbillsUnlimited.png");
logoPic.SetPosition(0, 13);
sl.InsertPicture(logoPic);
Not sure if there are other approaches but this definitely works!! Open for other suggestions!