Need To Export Straight Table To Excel Automatically On Reload
I have a straight table with, currently, 59 columns that I need to export off to a server location in Excel .xlsx format when the dashboard reloads. The reload is automatic at a set time. I'm guessing the filename will need to be unique each time it's reloaded, so a date stamp would be fine on the end of the filename. I've read several posts on this topic, but none that quite fit my needs. Anyone have any ideas on how I may be able to do this? I've tried the following macro in Document Properties --> Triggers --> OnPostReload, but the file is, for the most part, unusable. It does get exported, but again, you can't really use it as everything seems to run together.
sub Export set obj1 = ActiveDocument.GetSheetObject("CH238") obj1.Export "D:\InnerJoin.xls",4 msgbox("Exported to D:\InnerJoin.xls") endsub
Thanks in advance. As always, any and all responses are appreciated.
Olivier, Olivier, Olivier. What you suggest would be way too easy and make too much sense. LOL
It's actually a great idea! I was making it harder than it needed to be. So, thank you very much for the idea. I have successfully implemented it. I wound up with two variables and the Store Into line.
So, again, thank you Olivier for your suggestion. I appreciate it and your response. I have a little more work to do such as picking the columns I actually want to output and moving a few calculated dimensions into the load script, but not a big deal. I'll mark your reply as the correct answer.