Need a way of running excel VBA either through azure cloud or through any other way? - excel

I have a pipeline in azure that runs a script once per month. The script invokes a VBA. The problem is I can't run this VBA in azure, since in order for the script to run it requires a copy of excel. Is there any way to automate the process of executing a VBA either within azure or somewhere else and then grab the resulting excel files? I'm open to any ideas. Where else can I run VBAs external to azure and then draw those files into azure blob storage.
Thanks

First, use Windows Task Scheduler to run the excel every month and use macro to save the result in some network place, onedrive or sharepoint; or sent it by email; or push into some database, etc...
Second, use power automate and office script every month to handle the result file if necessary.

Related

Cognos Analytics - save weekly reports to local drive

In the current situation weekly scheduled reports are saved to the Cognos server. However, I was asked if there is a way to save them to a local network drive. Is this possible (documentation on this issue will help too)? We're using Cognos Analytics 11.0.13 on-premise.
Thanks in advance!
Yes. There are two ways.
Using Archive Location File System Root:
Within the Archive Location File System Root (in Configuration), a folder is created for a user or business unit to write to. In my case (on MS Windows) I use a junction pointing to their folder on the network.
In Define File System Locations (in Cognos Administration), I configure an alias to the folder and apply permissions for certain users, groups, or roles to use (write to) that alias.
Users schedule or use "run as" to get their reports to run and write output to their location.
Using CM.OutPutLocation and CM.OutputScript:
For the folder or report in Cognos, apply permissions for certain users, groups, or roles to create versions. (write or full permission?)
Users schedule or use "run as" to save their report output as a version of the report.
Cognos saves a copy to the folder defined in CM.OutPutLocation (in Cognos Administration).
The script defined in CM.OutputScript runs. This script can:
Identify which file was just created.
Read the description (xml) file to determine the report path.
If the report path matches a specific pattern or value, do something (like copy it to the subfolder/junction and rename it to something meaningful like the report name).
Delete the original output file.
The second option seems like more coding, but far more flexible. It must be a .bat file, but that can call anything (PowerShell, Windows Scripting Host, executable) to do the actual work, so a thorough knowledge batch programming isn't even needed.
Down the line, if the requirement changes from save to local file system and becomes save to cloud. There is also this functionality which has been added:
https://www.ibm.com/support/knowledgecenter/SSEP7J_11.1.0/com.ibm.swg.ba.cognos.ag_manage.doc/t_ca_manage_cloud_storage_add_location.html

How to get the internal table data in excel format if the report runs in background?

Could you please tell me the way to get internal table data in excel file to be saved in local desktop (presentation server). Remember that the report runs in background.
Both requirements a contradictionary because a backround job does not have any connection to any SAPGui. I.e. there is no SAPGui connection linked to a background job ans thus it is not possible to determine onto which local desktop the excel file should be saved.
A possibility would be to store the results that are created in the backround job somehow and externalize the save to a local desktop into another program. When creating files on the SAP AS you should keep in mind what happens with these file after they are not needed any longer. I.e. you need to do the file maintenance (deletion of files after they are not needed any longer) your self.
Theoretically you can do this, if you create the file on a SAP AS and move this file using any shell file move command. However, it's a bad practice to make any connection from SAP AS to a user's machine.
The best solution here is to create the file on SAP AS. The user must download the file manually from the SAP AS. You can also send this file to a user for example per e-mail. The user will do no manual work in the last case.
Also a good practice is to use PI server functionality. It can deliver your file within a way the user wants to have.

Schedule weekly Excel file download to an unique name

We got a database where every Monday a Excel file gets uploaded from a client. The file is always the same name so if we forgot it we lost it. Is there a way how we can make a script that renames the script and gives it the date or a number?
We're using FileZilla to get the files now.
FileZilla does not allow any kind of automation.
You can use this WinSCP script:
open ftp://user:password#host/
get "/path/sheet.xls" "c:\archive\sheet-%TIMESTAMP#yyyy-mm-dd%.xls"
exit
The script connects to the server, downloads the sheet to a local archive under a name like sheet-YYYY-MM-DD.xls.
For details see:
Automate file transfers (or synchronization) to FTP server or SFTP server
Downloading file to timestamped-filename
Then create a task in Windows scheduler to run the winscp.exe every Monday with arguments:
/script="c:\path_to_script\script.txt" /log="c:\path_to_script\script.log"
Logging (/log=...) is optional, but it's recommended.
For details, see Schedule file transfers (or synchronization) to FTP/SFTP server.
(I'm the author of WinSCP)

Transfer data into sharepoint using ssis

Is it possible to transfer data from SSIS to SharePoint and place the csv in a sharepoint list.
I have tried automating this with ssis and for some reason when I execute the package under a scheduled task the package will not run....
If i create a scheduled task and run dtexec (and the package path) this will not run under the scheduled task but it will run if i am using a .bat file and enter the same command script.. I am using creds that have access to the sharepoint site. It seems that there is just no way to automate placing csv files onto sharepoint.
http://social.msdn.microsoft.com/Forums/en/sharepoint2010programming/thread/905fd9fb-ae70-4335-9628-d28d040f0bdc
http://social.msdn.microsoft.com/Forums/en/sharepointdevelopment/thread/d59bbc46-27b4-468e-9ed6-70435200bef2
Although I haven't had the need to use it in a production environment yet, I'm sure this custom component will suit your needs :)
http://ssisctc.codeplex.com/wikipage?title=SharePoint List Destination&referringTitle=Home

How Can I Update My Web Site Automaticlly EveryDay?

The tasks I do manually for updating my web site:
Stop IIS 7
Copy source files from a folder to the virtual directory of my web site
Start IIS 7
There are many ways to approach this, but here is one way.
I am assuming you don't want every single file in your source repository to exist on your destination server. The best way to reliably extract what you need from your source on a regular basis is through a build file. Two options for achieving this are nant and msbuild.
Once you have the set of files you want to deploy, you now need a way to distribute them to your destination server & to stop and start IIS. Again, there are options, but I would personally recommend powershell (with the IIS snapin) for this.
If you want this to happen regularly, consider a batch file executed by some timer, such as a scheduled task, or even better, a CI solution such as TeamCity.
For a full rundown, there are examples within my PowerUp project that does this.
It depends where you are updating from, but you could have a your virtual directory pointing to a local read-only working copy of your source code and create a task that every day runs a batch file/powershell script/etc. that would update that working copy (via a svn update, git pull etc.)
That supposes that you have a branch that always contains the latest releasable code.
You have to create a batch file with the following content:
Stop WWW publishing service
Delete your old files
Copy the new files
Start WWW publishing service
You can start/stop services like this:
net stop "World Wide Web Publishing Service"
When you have your batch file you can create a task in the Task Scheduler that calls your batch in a regular time interval (e.g. each day).

Resources