ksobon / Bumblebee

Excel interop for Dynamo
36 stars 14 forks source link

"Excel Read" from Bumblebee #12

Closed JPDOliveira closed 8 years ago

JPDOliveira commented 8 years ago

Hi! I’m trying to use the Bumblebee package to read data from excel in a specific range of cells, the problem is that it gives me an error which I have no ideia how to solve it. So see for yourself: Dynamo and Excel files

Best regards

JPDOliveira commented 8 years ago

Hi Konrad,

Did you solve this bug?

Regards, João

ksobon commented 8 years ago

Please see my answer in the Dynamo forum thread or here:

It's the encoding for strings that excel uses that causes the issue. Specifically your file path contains some special characters that excel wasn't able to decode. I fixed it by specifying Unicode() encoding manually for the workbook open functions.

Thanks for posting!

if filePath == None:
            # run excel in live mode
            xlApp = LiveStream()
            live = True
        else:
            # run excel from file on disk
            xlApp = SetUp(Excel.ApplicationClass())
            if os.path.isfile(unicode(filePath)):
                xlApp.Workbooks.open(unicode(filePath))
            live = False            
ksobon commented 8 years ago

please test this solution and report back so i can incorporate that into bumbleee. Cheers!

ksobon commented 8 years ago

check latest bumblebee. should be fixed.

JPDOliveira commented 8 years ago

Working Perfectly!! Many thanks Konrad.

Regards