Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to send data to excel all at once to multiple excel sheets in one workbook?

Hi,

I have table in qvw. the fields are ID, Name, Add. I want to send the information to excel and in the excel sheet Add should be splited in multiple sheets. Please see the attached sample qvw and can anyone please suggest me how to send the data at once where Add is splited in sheets.

for eg: The Add field have data A,B,CC,DD,L........

I want the excel sheet have ID, Name ,Add where Add=A in one sheet  and ID, Name ,Add where Add=B in second sheet  and ID, Name ,Add where Add=DD in third sheet  and so on.

The original excel sheet have millions of Add. So, I was thinking whether is there any way to process this quickly. I have been trying this so many day but nothing working.

Thanks.

8 Replies
Not applicable
Author

Please see attached and help me as I have been struggling with this.

ecolomer
Master II
Master II

Here you have two example

Not applicable
Author

Thanks for your prompt reply. I have tried this when I am test the macro it is showing

Object required: 'ActiveDocument.GetSheetObject(...)'

Please help me

Not applicable
Author

It is working I have changed

ActiveDocument.GetSheetObject("TB01").CopyTableToClipboard true

But the only thing I need is when I selected Add values in list box as A and CC

I should need to have A data in one sheet and CC data in second sheet. Is there any way I can gt this. Please help me if I get this my problem will be solve.

Please help me.

Not applicable
Author

Please can I know this to sort out my problem?

ashfaq_haseeb
Champion III
Champion III

Hi,

Have a look at attached application.

Regards

ASHFAQ

Not applicable
Author

Thanks. Can you please tell me which one I have to use as I tried below but it is showing syntax error.

'// ****************************************************************
'// Internal function for adding a new sheet
'// ****************************************************************
Private Function Excel_AddSheet(objExcelApplication, sheetName) ' as Excel.Sheet

'// add a sheet to the last position
objExcelApplication.Sheets.Add , objExcelApplication.Sheets(objExcelApplication.Sheets.Count)

Dim objNewSheet
Set objNewSheet = objExcelApplication.Sheets(objExcelApplication.Sheets.Count)
objNewSheet.Name = left(sheetName,31)

'// return the newly created sheet
Set Excel_AddSheet = objNewSheet

End function

Not applicable
Author

Please help me as I have been struggling really to copy and paste each item