Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Loading Data

Hi all,

How to load data if One excel sheet itself got 4 tables.

Janaki.

19 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Janaki,

I saw a lot of answers that deal with loading all sheets from a single Excel (IMHO that was not your question)

But I'm interested in knowing how you managed to load those multiple freely formatted tables from a single Sheet.

Peter

Not applicable
Author

Yes Peter i haven't got answer for the question, however i got a requirement to load multiple sheets from Single Excel.I am trying to find out answer to load those multiple freely formatted tables from a single Sheet. i will get back to you soon.

Thanks

Peter_Cammaert
Partner - Champion III
Partner - Champion III

I think I may have found a solution, but it requires some work. And I don't know if it will fit your situation.

In Excel, you can assign Names to ranges of cells. For example, if you assign a name UNITS to the range A2 to F14 in your sheet, you will discover that the name pops up in the list of tables in the Table Files... dialog in QV Script Editor and together with the sheet names. If you do this for all three tables on the single sheet, you can still use Jagan's code to load the tables instead of any sheets. Just change the sheet names in vSheetNames into table names.

FYI I did prepare some excel data (see attachment).

Peter

Not applicable
Author

I couldn't found any attachment peter.

Thanks

nikhilgarg
Specialist II
Specialist II

Hey,

In your follwoing script :

Data:

LOAD *

     '$(vSheetName)' AS SheetName

FROM

[test.xlsx]

(ooxml, embedded labels, header is 2 lines);

What does header is 2 lines means ?? As it doesnot give same output as the alternate script does.

jagan
Luminary Alumni
Luminary Alumni

Hi,

header is 2 lines means, if header starts in second row in your excel file and in first there is some other text, then this will consider 2 row as header row.


Regards,

Jagan.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Here again.

Not applicable
Author

No it is not there.plz double check

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Please open the full thread. Do not expect attachments to be visible in your Inbox, because they won't.

Best,

Peter

Not applicable
Author

got it thanks