Jump to content

When LEGO and Excel collide

hysel

Hi all

 

In the last few months, I have been working on a project that will allow me to use an excel spreadsheet functions to pull LEGO set data like official name, release year, set image and average price form BrickLink

 

I have published the project here: https://github.com/hysel/Bricklink-Excel-Integration and I would love to get some feedback

 

The project is written in C# and uses ExcelDna addin

 

Note that I am not a full time programmer, just someone who can read and write some code 😉

 

Thanks in advance 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

I don't know if it's possible, but perhaps pull in images of the sets as well?

NOTE: I no longer frequent this site. If you really need help, PM/DM me and my e.mail will alert me. 

Link to comment
Share on other sites

Link to post
Share on other sites

11 minutes ago, Radium_Angel said:

I don't know if it's possible, but perhaps pull in images of the sets as well?

It's already there and I use the following VB module code to generate it in the excel:

 

Sub URLPictureInsert()
Dim Pshp As Shape
Dim xRg As Range
Dim xCol As Long
On Error Resume Next
Application.ScreenUpdating = False
Set Rng = ActiveSheet.Range("E2:E1000")
For Each cell In Rng
filenam = cell
ActiveSheet.Pictures.Insert(filenam).Select
Set Pshp = Selection.ShapeRange.Item(1)
If Pshp Is Nothing Then GoTo lab
xCol = cell.Column + 1
Set xRg = Cells(cell.Row, xCol)
With Pshp
.LockAspectRatio = msoFalse
If .Width > xRg.Width Then .Width = xRg.Width * 2 / 3
If .Height > xRg.Height Then .Height = xRg.Height * 2 / 3
.Top = xRg.Top + (xRg.Height - .Height) / 2
.Left = xRg.Left + (xRg.Width - .Width) / 2
End With
lab:
Set Pshp = Nothing
Range("A2").Select
Next
Application.ScreenUpdating = True
End Sub

image.thumb.png.553211393de9cf1fa9c01db3980624f6.png

Link to comment
Share on other sites

Link to post
Share on other sites

Excellent, I don't have Excel, so I couldn't tell.

This is a neat little program you've created!

NOTE: I no longer frequent this site. If you really need help, PM/DM me and my e.mail will alert me. 

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Radium_Angel said:

Excellent, I don't have Excel, so I couldn't tell.

This is a neat little program you've created!

Thank you, much appreciated 🙂

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×