Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro to remove blank sheets in excel and export to user email? Please help

Hi,

Can anyone help me with this.

I have been sending excel file to users daily with below details

Main

Sheet A
Sheet B
Sheet C
Sheet D
Sheet E
Sheet F
Sheet G
Sheet H
Sheet I
Sheet J
Sheet K
Sheet L

Based on cob data for eg: if there is data in Sheet A today and it won't be appear in the follwoing day or after two or three days. so, at that time Sheet A is showing blank sheet. same happening with other sheets as well.

I need a macro to load data into sheets from Main ...... Sheet L and if there is no data the sheet should not appear in excel instead it should automatically remobved from excel workbook.

Please can anyone help me with the macro that fulfills my requirement. I have been trying for macros and did most of the google search and couldn't find a solution that fulfill complete requirement. please any help would be appreciated.

The reason why I am asking this I have been doing this manually and I do not want to miss the file in case when I am out of office. It has been taking me to copy and paste more than 45 minutes to complete excel workbook. I have tried with excel template but it is loading with blank sheets when there is no data in any sheet that is causing me again to open excel workbook and delete the sheet manually.

Thanks.

6 Replies
asgardd2
Creator III
Creator III

Please, explain what you are exporting to Excel sheets? For example, what is on "Sheet A"? Table/image from qlikview sheet? I think, you must create a template and then via macro in QlikView delete or not excel sheets. After that send it to users.

Not applicable
Author

Thanks. Here is the explanation

I have excel sheet as below. Suppose if there is no data in any sheet I do not want to load the blank sheet. All I need is excel should be in user email through automation. this is a challenge to me now as users are asking why do we need to use access point why can not we get excels to emails daily first thing in morning.

Main - have summary pivot table with dimension as Status and expressions is Count (ID) and graph chart resembling the pivot table


MainRawData -  have straight table with all Status = 'Initial','Middle','Accountant','SubAccountant','Staff','PortalStaff','Manager','CustomercareStaff','ITStaff','Supplier','Market','Business'


SheetA - have data where Status='Initial'
SheetB - have data where Status='Middle'
SheetC - have data where Status='Accountant'
SheetD - have data where Status='SubAccountant'
SheetE - have data where Status='Staff'
SheetF - have data where Status='PortalStaff'
SheetG - have data where Status='Manager'
SheetH - have data where Status='CustomercareStaff'
SheetI - have data where Status='ITStaff'

SheetJ - have data where Status='Supplier'

SheetK - have data where Status='Market'

SheetL - have data where Status='Business'

Suppose for eg: today/tomorrow if there will be no data in SheetF where Status = 'PortalStaff' I do not want to load SheetF when there is no data because if there are blank sheets then my users needs to delete those blank sheets manually and that is not good daily. All users expecting excel file in their inbox first thing in the morning.

I have tried so many ways and I could able to add multiple emails to 'To' field but could not able to get right macro. this is very priority to me now as it has been outstanding so long.

Please any help would be appreciated.

Not applicable
Author

Sorry will send you attached so that it will be clear what I am asking.

Please can see attached and let me know how to fulfil the requirement.

Not applicable
Author

please can anyone suggest me how to do this.

Not applicable
Author

Friends,

can anyone have any suggestions please?

Not applicable
Author

Amelia2000‌- am also have the same issue do you got any idea for resolve this issue