Kindly elaborate a bit more pls
Could you please tell more details about the issue for better understanding.
So use a Start process activity and pass the filepath of excel as input to Filename property
—this will open the excel in foreground and use a Send hot key with key as ctrl+g and use type into activity with input as “A1”
—again a send hot key with key as ctrl+a
—and one more send hot key with key as Alt + h then and then a hot key as A and final one with key as C
Hot key - Ctrl+g
Type into with A1
Hot key - Ctrl+a
Hot key - Alt + h
Hot key - a
Hot key - c
Create one Excel template file with predefined column types and format and keep it in one folder. Whenever you want to write data then just copy this template file into other folder and then write data into it.
I don’t want to open the excel file bro. I want to do this in without opening the excel.
Then we can do that with Macro
For that in excel itself under VIEW option click on Macro and click on Record Macro
Do all the manual steps that will align to centre which will recorded as a vb script in background
Then pause the macro
—then click on Macro option again and click on view Macro and edit option
—this will open the vb script page
—copy that script and paste it in a text file
—now pass that text file path as input or INVOKE VBA activity with Macro name as property
you can try this one . it has feature all the feature like below.
I recorded the macro, and calling the code text file and storing in a variable.
Next tell me what I have to do.
In the Invoke VBA I didn’t see which option you told me.
where you told me to pass the text file var in input which activity input ??
Have you tried Format Cells activity developed by @balupad14. If not then try with that activity first. You no need to create any macros and run it separately.
Other alternative is to create one template excel file and follow the steps as mentioned in my previous post.
sorry that was my mistake…
we need to pass the filepath of the macro text file to INVOKE VBA and mention the function as method name
keep this invoke vba inside the excel application scope
I have attached a sample to get clear idea in the below. I will solve the issue.
sorry I didn’t get this function name as method name? which function name?
in your macro text file in the first line of it
sub macro1() \\some name will be there right
that is what we need to mention in the method name
in your excel setting, check the Trust access to the VBA project object model , under Macro Settings in Options .
Hi Palani thanks it worked. I want to know one thing. Suppose If no excel is installed on the server, OR Macro is not installed in the Excel will this work ??
hmm we can use invoke vb script activity
but not sure how far it would work
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.