Importing different Excel sheets in different tree

Hi,

I am importing the data from excel using Lunch box and TT Toolbox. When I try to import the data from multiple sheets I get all the data under one tree.

Is it possible to import different sheets into different trees?


ImportingExcel.gh (8.5 KB)

I assume that grafting the Worksheet input will read them into different branches. (Can’t test your gh file atm.)

Unfortunately it doesn’t seem to work with those plugins.
I’d suggest using one component for each sheet, then Entwine the result (removing the Flatten option).

Tried grafting but it didn’t work.

This is the workaround I am looking into, but with a lot of sheets in excel it is not really handy.

If all the sheets have the same amount of rows/columns, you could Partition List the output. If not, I’ afraid there is no solution without re-coding the component and being more careful about the output tree paths…

Thanks for the input. Unfortunately, each sheets have different length

Here is a C# component that will read through several worksheets.
Be careful though, error handling is reduced to the minimum - it’s also slower than Lunchbox or TTToolbox.

The trick is to prepend the worksheet index in the data tree.

ReadExcelMultipleSheets.gh (8.3 KB)

Works great. Thanks a ton.