Five Stars

Read a xlsx file and save each sheet into a new file

Hi folks,

I have a xlsx file that has many sheets, i need to read this sheets and put each sheet into a text file.

I've made a solution, but it doesn't work, because this solution create empty files.

 

My solution is:
tFileInputExcel --> Iterate --> tJava --> Main --> tFileOutputDelimited

 

tFileInputExcel is getting all sheets with dynamic schema;

tJava changes the output file name including sheet name as suffix of name;

tFileOutputDelimited only writes to disk with option append enabled;

 

* This solution needs a dynamic schema, i'll use it for all kind of xls files into my application.

 

Can someone help me with this solution?

 

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Five Stars

Re: Read a xlsx file and save each sheet into a new file

Hi,
Only for spread knowledgement, i will share my solution here:

I created this sequence of components

tFileList (listing all xls files into a folder) --> Iterate
tJava (this componente call a routine class that i made, it read the current xls file, read the name of all sheets and put a list into global variables) --> Iterate
tLoop (looping through quantity of sheets) --> Iterate
tJava (get the name of current sheet and fill a context variable) --> Iterate

tFileInputExcel (read the excel file, the name of sheet is a context variable) --> Main

tFileOutputDelimited (write on disk the file with dynamic schema, the name of file are dynamic)

 

Well, if anyone has doubt about this solution, let me know.

1 REPLY
Five Stars

Re: Read a xlsx file and save each sheet into a new file

Hi,
Only for spread knowledgement, i will share my solution here:

I created this sequence of components

tFileList (listing all xls files into a folder) --> Iterate
tJava (this componente call a routine class that i made, it read the current xls file, read the name of all sheets and put a list into global variables) --> Iterate
tLoop (looping through quantity of sheets) --> Iterate
tJava (get the name of current sheet and fill a context variable) --> Iterate

tFileInputExcel (read the excel file, the name of sheet is a context variable) --> Main

tFileOutputDelimited (write on disk the file with dynamic schema, the name of file are dynamic)

 

Well, if anyone has doubt about this solution, let me know.