thedeadzeds
Active Member
- Joined
- Aug 16, 2011
- Messages
- 442
- Office Version
- 365
- Platform
- Windows
Hi Guys,
Is there a way to unlink a power query and re-link via vba. Scenario below:
At the moment I am importing that a CSV called 'export' into excel via Refresh all - copying the relevant data to a new worksheet to create a large table to data. I then repeat this several times. The export is always call 'Export' so the power query is linked to csv called 'export'
However, I am unable to delete that export whilst the workbook is open as the power query is linked to CSV called 'export'. So I need to close the workbook, delete the old export csv file and repeat the process. Is there a way to unlink the power query to the csv export file and re-link using vba or something else so i do not have to close the workbook every time.
Thanks
Is there a way to unlink a power query and re-link via vba. Scenario below:
At the moment I am importing that a CSV called 'export' into excel via Refresh all - copying the relevant data to a new worksheet to create a large table to data. I then repeat this several times. The export is always call 'Export' so the power query is linked to csv called 'export'
However, I am unable to delete that export whilst the workbook is open as the power query is linked to CSV called 'export'. So I need to close the workbook, delete the old export csv file and repeat the process. Is there a way to unlink the power query to the csv export file and re-link using vba or something else so i do not have to close the workbook every time.
Thanks