Access two excel files using single macro - excel

I have macro, using which i am trying to open a excel file then make some validation in the file that is opened. And Open another excel file and put the validation results(of excel file 1) in the form of report in the 2nd Excel.
So the task i have to do here is:
Open Excel file 1
Script to validate data in excel file 1.
Open Excel file 2
Enter the results in it.
Here i am able to open two excel files but not able to create pointers to them. Such as
if i use Sheets("Sheet1").Range("A1").value 'this picks data from Excel file 1.
But to access Excel file 2 what do i need to write, is this something like this:
Sheets("!Sheet1").Range("A1").value
Please help me to fix this. Thanks.

Application.Workbooks("create-a-macro").Worksheets(1).Range("A1").Value = "Hello"
Visit http://www.excel-easy.com/vba/workbook-worksheet-object.html

Related

Copy sheet(s) from one excel file to another excel file

I have an excel sheet that is opened and I want to copy some specific sheets from target excel file into the file that is opened.I want to have
A field to define the path of target excel file.
A field to define the name of the sheets to be copied.
A button to execute the command.
Can someone one give me source code or a place where I can get the help regarding the required functionality or best if there is file with macro.

How to append one excel file as a sheet onto another excel file in alteryx

so I have about 90 different excel files that are customer reports. I have one generic excel file that's a summary page that I need to insert as a sheet into all of those other excel files. Does anyone have a way to automate this process - I'm generating the sheets through alteryx but open to solutions outside of that platform or maybe there's a simple way to do it through Excel that I'm missing.
Right now, the only option is to open each report and copy over the summary sheet and insert it that way. To do it for 90 sheets would take me over an hour so trying to shorten the time.

How to Combine Multiple Excel into one with Talend

I'm a new in Talend and need some help.
I want to write data in the same excel file containing different sheets, I have 2 tFileOuputExcel, I put the same file name and different sheet names,
In output the data is written only in the first sheet but not in the second sheet.
Below is the screenshot of my job.
You can use tFileExcel-Components 13.3 by Jan Lolling on Talend Exchange. We have been using it in our project without any issues. You can use
tFileExcelWorkbookOpen - to open excel file (blank template file)
tFileExcelSheetOutput - to write to each sheet of the workbook opened above.
tFileExcelWorkbookSave - to save the excel file
in 2nd tFileOutputExcel select checkbox "Append Existing File"

How to run a vba macro for multiple excel files

I am a naive user of VBA and I am looking for a VBA macro which would do the following task
Delete 3 tabs from the file and delete the first 6 rows from remanining tabs.
Perform this for all the excel files (2013) and save as xlsx in the same or different file folder.
I tried the code available on this link
Run same excel macro on multiple excel files
At the line
Filename=Dir(Pathname & "*.xlsx") , I am getting an error which says run time error "52" Bad file name or number.
I have changed this:
Pathname = "\C:\Users\Desktop\test\try\"\
Is this correct?
Not sure if it's your only problem, but
\C:\Users\Desktop\test\try\
should be
C:\Users\Desktop\test\try\ (without the first backslash)
*I realize this should be a comment--I'm under 50 rep, however.

Batch file opening Excel file and Macro

I want to create a batch file which when I run this file, an excel file should open with some columns in it.
Say if I click on batch file, excel file with columns name, project, ID should also get included in excel file.
Also with this a macro should be open.
Please help. I dont have any idea about this.
I don't think it is possible to automate excel with pure batch.
Why not:
Create an "template" excel file with the default columns and macro included
Have a batch file copy this template (copy template.xslx newfile.xslx) file and open it (`Start newfile.xslx).
For the new file, you'd either have to generate a random or timestamp-based name or have the user enter the name before making a copy.

Resources