I'm working on Talend and recently my goal was to parse each sheet of an Excel file to do some different things.
For example, nowadays I'm working on an excel file composed of 4 sheets and I want to replace some values by other values in both sheets. The output file would be the same excel file, composed of its 4 sheets with all the values, including those replaced.
I used tFileExcelWorkbook and tFileExcelSheetList to parse my Excel file, then tFlowIterate to create a global variable (name of sheet) and tReplace to make the search/replace.
But actually I'm stuck.. I really don't know How to make it to create the same excel file, with the same sheets by using that tReplace component.
Do you know what I could do to solve that problem, and more generally how to do to parse sheets of an Excel file ?
Thanks !
Julien
Julien,
Easier way to parse/process sheets in an Excel would be to use a tFileInputExcel and in the "Sheet list" define the sheet names/position that needs to be worked on.
Renju MAthews
Related
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"
I tried using XSSFBEventBasedExcelExtractor class but it reads all of the data in the sheets present.
I have many sheets in Binary excel file and I want to extract one sheet. Is there a way to do that? Other approaches are welcome.
Here's my desired outcome: I want an Excel workbook (say Master.xls) that I can drop into a directory of other Excel workbooks and Master.xls will extract a given range of cells from all of the hundreds of other workbooks in that directory. I have multiple directories with hundreds of Excel files in each, so I need a Master.xls file that will easily move between directories with different file paths and update based on the files around it in the directory. In my Master.xls file, I can build the file names for all of these other workbooks using text functions like CONCATENATE.
The problem comes when I try to use Excel to reference cells in workbooks that are not currently open. The problems:
INDEX can access closed workbooks using hard-coded paths, but can't (as far as I can tell) accept cell ranges as text. To enter cell ranges as text to other functions, one has to use the...
INDIRECT function, which doesn't work for closed workbooks.
Basically, INDEX can solve my problem but I can't figure out how to get it to work without hard-coding the paths to the closed workbook into the function call. That's a deal breaker, since I have thousands of workbooks to reference and doing a find-replace to change the file path for each workbook is time-prohibitive and not maintainable.
Other constraints: no Excel add-ins since this sheet has to be shared with others and no VBA because this has to be used by people with fear of macros. I recognize that Excel is not the right tool for this job. Believe me, if I could use another tool, I would.
Update: sample Excel sheet showing the problem:
Going straight to the source at MS Office support, INDIRECT does not work with external workbooks.
Here's my desired outcome: I want an Excel workbook (say Master.xls) that I can drop into a directory of other Excel workbooks and Master.xls will extract a given range of cells from all of the hundreds of other workbooks in that directory. I have multiple directories with hundreds of Excel files in each, so I need a Master.xls file that will easily move between directories with different file paths and update based on the files around it in the directory. In my Master.xls file, I can build the file names for all of these other workbooks using text functions like CONCATENATE.
The problem comes when I try to use Excel to reference cells in workbooks that are not currently open. The problems:
INDEX can access closed workbooks using hard-coded paths, but can't (as far as I can tell) accept cell ranges as text. To enter cell ranges as text to other functions, one has to use the...
INDIRECT function, which doesn't work for closed workbooks.
Basically, INDEX can solve my problem but I can't figure out how to get it to work without hard-coding the paths to the closed workbook into the function call. That's a deal breaker, since I have thousands of workbooks to reference and doing a find-replace to change the file path for each workbook is time-prohibitive and not maintainable.
Other constraints: no Excel add-ins since this sheet has to be shared with others and no VBA because this has to be used by people with fear of macros. I recognize that Excel is not the right tool for this job. Believe me, if I could use another tool, I would.
Update: sample Excel sheet showing the problem:
Going straight to the source at MS Office support, INDIRECT does not work with external workbooks.
I am trying to write and excel macro that will copy data from an excel file with multiple sheets. Each column will have different lengths and the name of the sheet will not always be known. I want it to start by having the user select the original file and a new one be started, which is where it will be copying to. There are multiple columns and only two of them I am interested in. They are the m/z and the intensity. I also have to know which sheet the value came from. I would prefer it if they sheet name was presented in a column next to the combined m/z's and intensity's. I am new to this and can use all the help available.
As above - use the macro recorder and make sure you are using named ranges.... an example upload would also help p[eople help you...